fix: Callback route guard allows Auth0 code exchange to complete (#188) #189

Closed
opened 2026-02-15 03:45:35 +00:00 by egullickson · 0 comments
Owner

Relates to #188

Summary

Fix the callback route handling in App.tsx so that when a user lands on /callback during Auth0 code exchange, the app shows a loading state instead of redirecting to homepage.

Problem

App.tsx:545 requires isCallbackRoute && isAuthenticated to render CallbackPage. On mobile, if Auth0 SDK hasn't finished the code exchange when isLoading becomes false, the user on /callback hits the !isAuthenticated guard at line 602 and gets redirected to /.

Changes

  • File: frontend/src/App.tsx
  • Move callback route handling before the !isAuthenticated guard
  • When on /callback and not yet authenticated, show "Processing login..." loading state
  • Allow Auth0 SDK time to complete code exchange on mobile

Acceptance Criteria

  • /callback route shows loading state while Auth0 processes
  • After code exchange completes, CallbackPage renders correctly
  • Desktop callback flow unaffected
Relates to #188 ## Summary Fix the callback route handling in App.tsx so that when a user lands on `/callback` during Auth0 code exchange, the app shows a loading state instead of redirecting to homepage. ## Problem App.tsx:545 requires `isCallbackRoute && isAuthenticated` to render CallbackPage. On mobile, if Auth0 SDK hasn't finished the code exchange when `isLoading` becomes `false`, the user on `/callback` hits the `!isAuthenticated` guard at line 602 and gets redirected to `/`. ## Changes - **File**: `frontend/src/App.tsx` - Move callback route handling before the `!isAuthenticated` guard - When on `/callback` and not yet authenticated, show "Processing login..." loading state - Allow Auth0 SDK time to complete code exchange on mobile ## Acceptance Criteria - [ ] `/callback` route shows loading state while Auth0 processes - [ ] After code exchange completes, CallbackPage renders correctly - [ ] Desktop callback flow unaffected
egullickson added the
status
in-progress
type
bug
labels 2026-02-15 03:45:51 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: egullickson/motovaultpro#189