fix: redirect unverified users to verification page from Login button (refs #53)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m46s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 29s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 2m46s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 29s
Deploy to Staging / Verify Staging (pull_request) Successful in 7s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 6s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped
When a user signs up but doesn't verify their email, clicking the Login button on the landing page would either do nothing or get stuck in a loading state. Now checks for pendingVerificationEmail in localStorage (set during signup) and redirects to /verify-email instead of attempting Auth0 login. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,14 @@ export const HomePage = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if user has a pending email verification (signed up but not verified)
|
||||||
|
const pendingVerificationEmail = localStorage.getItem('pendingVerificationEmail');
|
||||||
|
if (pendingVerificationEmail) {
|
||||||
|
// Redirect to verify-email page with the stored email
|
||||||
|
navigate('/verify-email', { state: { email: pendingVerificationEmail } });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
loginWithRedirect({ appState: { returnTo: '/garage' } });
|
loginWithRedirect({ appState: { returnTo: '/garage' } });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user