Summary
This is an intermediate transit screen shown while the app initiates the Google OAuth flow via Supabase. A loading spinner and "Redirecting to Google…" text are displayed. If the flow fails, an error message and a "Back to login" button appear. On success the browser is redirected to Google and then back to the app automatically.
Page Functionalities
- Loading state — CircularProgressIndicator and "Redirecting to Google…" text while the OAuth handshake is in progress.
- "Back to login" TextButton (loading state) — Allows the user to cancel and return to the originating route (default:
/login).
- Error state — Error icon plus "Sign in with Google failed. Please try again." message if initiation fails.
- "Back to login" ElevatedButton (error state) — Returns to the originating route. Also triggered automatically after 3 seconds on error.
Scenarios
Successful Google sign-in initiation
- Click "Sign in with Google" on the Login or Register screen.
- This screen appears briefly showing a spinner.
- The browser redirects to Google's auth page automatically.
- After authorising at Google, the app session is established and you are forwarded to the home screen.
Sign-in initiation fails
- An error message is shown.
- After 3 seconds the app navigates back to the originating screen automatically, or click Back to login immediately.