feat(auth): handle google oauth account claim conflicts
Some checks failed
Frontend CI/CD / build (push) Has been cancelled
Frontend CI/CD / deploy (push) Has been cancelled

This commit is contained in:
2026-05-14 21:15:30 +03:30
parent 38ba89b82f
commit cd5409c9b2
4 changed files with 105 additions and 45 deletions

View File

@@ -109,26 +109,31 @@ export const en = {
countdownLabel: (time: string) => `Retry in ${time}`,
fallback: "Too many requests. Please wait and try again.",
},
google: {
loadingTitle: "Completing Google sign in",
loadingDescription: "We are validating your Google account and preparing the next step.",
collectMobileTitle: "Finish your account setup",
collectMobileDescription: (email: string) =>
`Google verified ${email}. Enter your mobile number to finish creating your account.`,
claimTitle: "Verify your existing account",
claimDescription: (mobile: string) =>
`An account with ${mobile} already exists. Enter the verification code sent to that number to attach Google.`,
errorTitle: "Google sign in could not be completed",
missingFlow: "The Google sign-in flow is missing or has expired.",
loadFailed: "We could not load your Google sign-in state.",
completeFailed: "We could not finish your Google account setup.",
claimOtpSent: "Verification code sent successfully.",
googleAccount: "Google account",
completeButton: "Continue and create account",
verifyClaimButton: "Verify and continue",
resendClaimOtp: "Resend verification code",
restartGoogle: "Start Google sign in again",
},
google: {
loadingTitle: "Completing Google sign in",
loadingDescription: "We are validating your Google account and preparing the next step.",
collectMobileTitle: "Finish your account setup",
collectMobileDescription: (email: string) =>
`Google verified ${email}. Enter your mobile number to finish creating your account.`,
existingEmailClaimDescription: (email: string, mobileHint: string) =>
`Google verified ${email}. Enter the mobile number already connected to this account (${mobileHint}) to confirm ownership.`,
claimTitle: "Verify your existing account",
claimDescription: (mobile: string) =>
`An account with ${mobile} already exists. Enter the verification code sent to that number to attach Google.`,
mobileClaimDescription: (mobile: string) =>
`A mobile-only account with ${mobile} already exists. Verify the code sent to that number to attach Google and keep that account.`,
errorTitle: "Google sign in could not be completed",
missingFlow: "The Google sign-in flow is missing or has expired.",
loadFailed: "We could not load your Google sign-in state.",
completeFailed: "We could not finish your Google account setup.",
claimOtpSent: "Verification code sent successfully.",
googleAccount: "Google account",
mobileHintLabel: (mobileHint: string) => `Expected mobile: ${mobileHint}`,
completeButton: "Continue and create account",
verifyClaimButton: "Verify and continue",
resendClaimOtp: "Resend verification code",
restartGoogle: "Start Google sign in again",
},
},
loginTerms: {