When a user signs up but does not verify their email, the Login button on the landing page becomes unresponsive. Clicking it does nothing - no navigation, no error message, no feedback.
Auth gate logic may be blocking navigation without providing user feedback
Login button click handler may need to check verification status and redirect accordingly
Need to determine if verification state comes from Auth0 email_verified flag or application database
Affected Pages
Landing page Login button (desktop and mobile)
## Bug Description
When a user signs up but does not verify their email, the Login button on the landing page becomes unresponsive. Clicking it does nothing - no navigation, no error message, no feedback.
## Steps to Reproduce
1. Sign up for a new account
2. Do NOT verify the email
3. Navigate to the landing page (https://staging.motovaultpro.com/)
4. Click the "Login" button in the upper right
## Actual Behavior
- Login button does nothing when clicked
- URL remains unchanged at the homepage
- No error messages displayed
- Console shows `isAuthGateReady: false` state
- User has no indication why login isn't working
## Expected Behavior
- User should be redirected to the existing verification page (`VerifyEmailPage.tsx` / `VerifyEmailMobileScreen.tsx`)
- Clear messaging should inform the user they need to verify their email before logging in
## Technical Notes
- Console logs show `[Auth Gate] Module loaded, authInitialized: false`
- Auth debug state: `isLoading: false, isAuthenticated: false, isAuthGateReady: false`
- Verification pages already exist in the codebase:
- `frontend/src/features/auth/pages/VerifyEmailPage.tsx`
- `frontend/src/features/auth/mobile/VerifyEmailMobileScreen.tsx`
## Investigation Areas
- Auth gate logic may be blocking navigation without providing user feedback
- Login button click handler may need to check verification status and redirect accordingly
- Need to determine if verification state comes from Auth0 `email_verified` flag or application database
## Affected Pages
- Landing page Login button (desktop and mobile)
Analyzed the auth flow in HomePage.tsx and App.tsx:
Root Cause: When an unverified user clicks Login:
If isAuthenticated is true (Auth0 session exists), navigates to /garage
The auth gate (isAuthGateReady) may never become ready if token acquisition fails for unverified users
Results in "Initializing session..." spinner forever, or silent redirect back to homepage
Existing Infrastructure:
localStorage.setItem('pendingVerificationEmail', email) is set during signup
Verification pages already read from this storage
Clean redirect path exists to /verify-email
Fix Implemented
File: frontend/src/pages/HomePage.tsx:23-38
consthandleAuthAction=()=>{if(isAuthenticated){navigate('/garage');return;}// Check if user has a pending email verification (signed up but not verified)
constpendingVerificationEmail=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'}});};
Verification Status
Lint: PASS (no new warnings)
Type-check: PASS
Tests: Pre-existing failures only (unrelated to this change)
Verdict: PASS | Next: Visual verification on staging
## Milestone: Implementation Complete
**Phase**: Execution | **Agent**: Developer | **Status**: IN_PROGRESS
### Investigation Summary
Analyzed the auth flow in `HomePage.tsx` and `App.tsx`:
1. **Root Cause**: When an unverified user clicks Login:
- If `isAuthenticated` is true (Auth0 session exists), navigates to `/garage`
- The auth gate (`isAuthGateReady`) may never become ready if token acquisition fails for unverified users
- Results in "Initializing session..." spinner forever, or silent redirect back to homepage
2. **Existing Infrastructure**:
- `localStorage.setItem('pendingVerificationEmail', email)` is set during signup
- Verification pages already read from this storage
- Clean redirect path exists to `/verify-email`
### Fix Implemented
**File**: `frontend/src/pages/HomePage.tsx:23-38`
```typescript
const handleAuthAction = () => {
if (isAuthenticated) {
navigate('/garage');
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' } });
};
```
### Verification Status
- Lint: PASS (no new warnings)
- Type-check: PASS
- Tests: Pre-existing failures only (unrelated to this change)
*Verdict*: PASS | *Next*: Visual verification on staging
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Bug Description
When a user signs up but does not verify their email, the Login button on the landing page becomes unresponsive. Clicking it does nothing - no navigation, no error message, no feedback.
Steps to Reproduce
Actual Behavior
isAuthGateReady: falsestateExpected Behavior
VerifyEmailPage.tsx/VerifyEmailMobileScreen.tsx)Technical Notes
[Auth Gate] Module loaded, authInitialized: falseisLoading: false, isAuthenticated: false, isAuthGateReady: falsefrontend/src/features/auth/pages/VerifyEmailPage.tsxfrontend/src/features/auth/mobile/VerifyEmailMobileScreen.tsxInvestigation Areas
email_verifiedflag or application databaseAffected Pages
Milestone: Implementation Complete
Phase: Execution | Agent: Developer | Status: IN_PROGRESS
Investigation Summary
Analyzed the auth flow in
HomePage.tsxandApp.tsx:Root Cause: When an unverified user clicks Login:
isAuthenticatedis true (Auth0 session exists), navigates to/garageisAuthGateReady) may never become ready if token acquisition fails for unverified usersExisting Infrastructure:
localStorage.setItem('pendingVerificationEmail', email)is set during signup/verify-emailFix Implemented
File:
frontend/src/pages/HomePage.tsx:23-38Verification Status
Verdict: PASS | Next: Visual verification on staging
Final Review: Quality Agent Validation
Phase: Review | Agent: Quality Agent | Status: PASS
RULE 0/1/2 Analysis
Verification Summary
handleAuthActionused in 5 places (desktop nav, mobile menu, hero carousel, welcome section, bottom CTA)Integration Points Validated
SignupPage.tsxline 20: SetspendingVerificationEmailin localStorageVerifyEmailPage.tsxline 23-24: Reads same localStorage keyVerifyEmailPage.tsxline 42: Clears localStorage after successful verificationFull round-trip flow is complete and consistent.
PR Details
issue-53-login-button-unverified-usersfrontend/src/pages/HomePage.tsx)Verdict: APPROVED | Next: Merge PR