feat: User onboarding finished
This commit is contained in:
@@ -47,8 +47,10 @@ const AdminCommunityStationsMobileScreen = lazy(() => import('./features/admin/m
|
||||
// Auth pages (lazy-loaded)
|
||||
const SignupPage = lazy(() => import('./features/auth/pages/SignupPage').then(m => ({ default: m.SignupPage })));
|
||||
const VerifyEmailPage = lazy(() => import('./features/auth/pages/VerifyEmailPage').then(m => ({ default: m.VerifyEmailPage })));
|
||||
const CallbackPage = lazy(() => import('./features/auth/pages/CallbackPage').then(m => ({ default: m.CallbackPage })));
|
||||
const SignupMobileScreen = lazy(() => import('./features/auth/mobile/SignupMobileScreen').then(m => ({ default: m.SignupMobileScreen })));
|
||||
const VerifyEmailMobileScreen = lazy(() => import('./features/auth/mobile/VerifyEmailMobileScreen').then(m => ({ default: m.VerifyEmailMobileScreen })));
|
||||
const CallbackMobileScreen = lazy(() => import('./features/auth/mobile/CallbackMobileScreen').then(m => ({ default: m.CallbackMobileScreen })));
|
||||
|
||||
// Onboarding pages (lazy-loaded)
|
||||
const OnboardingPage = lazy(() => import('./features/onboarding/pages/OnboardingPage').then(m => ({ default: m.OnboardingPage })));
|
||||
@@ -469,13 +471,19 @@ function App() {
|
||||
);
|
||||
}
|
||||
|
||||
if (isCallbackRoute) {
|
||||
// Callback route requires authentication - handled by CallbackPage component
|
||||
if (isCallbackRoute && isAuthenticated) {
|
||||
return (
|
||||
<ThemeProvider theme={md3Theme}>
|
||||
<CssBaseline />
|
||||
<div className="flex items-center justify-center min-h-screen">
|
||||
<div className="text-lg">Processing login...</div>
|
||||
</div>
|
||||
<React.Suspense fallback={
|
||||
<div className="flex items-center justify-center min-h-screen">
|
||||
<div className="text-lg">Processing login...</div>
|
||||
</div>
|
||||
}>
|
||||
{mobileMode ? <CallbackMobileScreen /> : <CallbackPage />}
|
||||
</React.Suspense>
|
||||
<DebugInfo />
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
@@ -507,11 +515,8 @@ function App() {
|
||||
);
|
||||
}
|
||||
|
||||
if (!isAuthenticated) {
|
||||
return <Navigate to="/" replace />;
|
||||
}
|
||||
|
||||
// Verify email and onboarding routes require authentication but not full initialization
|
||||
// Verify email is public - shown after signup before user can login
|
||||
// (Auth0 blocks unverified users from logging in)
|
||||
if (isVerifyEmailRoute) {
|
||||
return (
|
||||
<ThemeProvider theme={md3Theme}>
|
||||
@@ -528,6 +533,10 @@ function App() {
|
||||
);
|
||||
}
|
||||
|
||||
if (!isAuthenticated) {
|
||||
return <Navigate to="/" replace />;
|
||||
}
|
||||
|
||||
if (isOnboardingRoute) {
|
||||
return (
|
||||
<ThemeProvider theme={md3Theme}>
|
||||
|
||||
Reference in New Issue
Block a user