Add coach Google Sign-In with backend id_token exchange#84
Open
sahilkashyap64 wants to merge 3 commits into
Open
Add coach Google Sign-In with backend id_token exchange#84sahilkashyap64 wants to merge 3 commits into
sahilkashyap64 wants to merge 3 commits into
Conversation
✅ Deploy Preview for thunderous-muffin-603a62 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
id_tokenwith the backend so coaches can authenticate via Google.access_token/refresh_tokenand session data (user_id,user_type,profile,locations) for subsequent API calls.Description
coachGoogleLogin(idToken)tosrc/api/auth.jstoPOST /api/auth/google/coach-loginand return{ ok, status, data }.src/hooks/useAuth.jsxwithloginWithGooglewhich exchanges theid_token, validates coach-only access, stores tokens viastoreTokens, and persists normalized session in local storage.src/components/auth/LoginPage.jsxto dynamically load the SDK, render the official Google button, obtain the SDKcredential(id_token), and callloginWithGoogle; email/password login remains as fallback.google_email_not_verified,account_exists_with_different_role,invalid_google_token, and missing backend client-id configuration, and added README notes aboutVITE_GOOGLE_AUTH_CLIENT_ID/VITE_GOOGLE_CLIENT_IDalignment with backend.Testing
npm test, all tests passed (10tests,0failures).npm run build, which completed successfully.Codex Task