Use Google sub as temporary password, add 409 fallback handling, and document Google auth flow#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41f32f9798
ℹ️ 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".
| email = googleUser.email, | ||
| sub = googleUser.sub | ||
| ) | ||
| val password = googleUser.sub |
There was a problem hiding this comment.
Keep backward-compatible password derivation for Google login
Switching Google sign-in to password = googleUser.sub breaks every existing Google account created before this commit, because those users were registered with hashEmailWithSub(email, sub) and this flow no longer tries that legacy credential. In AuthWithGoogleCaseUse, the first login attempt now always sends the new password format, so legacy users get 401, then 409 on re-register, and are effectively locked out of one-tap despite having valid accounts.
Useful? React with 👍 / 👎.
Qodana for JVM4 new problems were found
View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.3.2
with:
upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com
|
Motivation
subidentifier as the behind-the-scenes password instead of a hashed email+sub value.READMEfor contributors.Description
password = googleUser.subinAuthWithGoogleCaseUseandRegisterWithGoogleUseCaseand removed the unusedhashEmailWithSubimport.AuthWithGoogleCaseUsewrapped the register flow to catch a409Appwrite response and translate it into anIllegalStateExceptionwith a user-facing message that instructs to login once with email+password to recover Google one-tap functionality.accountRepository.updateProfileso the profile update runs once after successful registration/login.README.mddescribing the current Google authentication flow, rules, and the technical fallback behavior for401/409cases.Testing
./gradlew test, which completed successfully../gradlew assembleDebugand the build succeeded.Codex Task