Update Google social login client ID, refresh google-services.json and replace Android ProfileScreen#107
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ce59a739a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| $stmt = $db->prepare(" | ||
| SELECT id, profile_photo | ||
| FROM users | ||
| WHERE google_id = ? OR email = ? | ||
| LIMIT 1 |
There was a problem hiding this comment.
Verify token email before matching by email
Because the lookup uses google_id = ? OR email = ? with $email taken from the client request, a user can present a valid Google ID token for their own account while supplying someone else’s email and be logged in as that account if it exists. This is an account‑takeover path for any email/password user without a google_id. Use the email from the verified $payload (and check email_verified) or only match by google_id and link accounts explicitly.
Useful? React with 👍 / 👎.
| plugins { | ||
| alias(libs.plugins.androidApplication) | ||
| alias(libs.plugins.jetbrainsKotlinAndroid) | ||
| alias(libs.plugins.googleServices) |
There was a problem hiding this comment.
Provide google-services.json in the app module
The Google Services Gradle plugin is applied in this module, but a repo search (rg --files -g 'google-services.json') only finds the file at the repo root, not under android-app/app. With the plugin enabled, Gradle’s process*GoogleServices tasks will fail and Firebase config won’t load unless the JSON is placed in the app module (or the plugin is configured to a custom location).
Useful? React with 👍 / 👎.
Motivation
id_tokento the backend, and logs Firebase analytics events.Description
api-app/social_login.phpto verify Google ID tokens using the supplied client id1063276280060-ufkg168easlt949km6r6bk7s3u6bg8af.apps.googleusercontent.comand preserve profile photo handling and session setup.google-services.jsonwith the provided JSON payload that contains the new OAuth client IDs, API key and appinvite configuration.ProfileScreen.ktimplementation underandroid-app/app/src/main/java/com/guidexy/app/ui/screens/ProfileScreen.ktto request ID tokens viaGoogleSignInOptions, launch the sign-in intent, and sendSocialAuthRequest(provider="google", id_token=...)to the backend while logging Firebase analytics events.Testing
Codex Task