Skip to content

Commit bf028e5

Browse files
committed
fix: improve authentication error message for existing account linkage
1 parent 3df07be commit bf028e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/providers/AuthProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
6565
connectTheUser(token, provider).catch((error) => {
6666
if (error && error.code === 'auth/account-exists-with-different-credential') {
6767
setAuthError({
68-
message: `You've previously signed up using ${oppositeProvider}. To continue, please sign in with ${oppositeProvider}.`,
68+
message: `This email is already linked to your ${oppositeProvider} account. To continue, please sign in with ${oppositeProvider}.`,
6969
})
7070
} else if (error) {
7171
setAuthError({
@@ -115,7 +115,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
115115
connectTheUser(token, provider).catch((error) => {
116116
if (error && error.code === 'auth/account-exists-with-different-credential') {
117117
setAuthError({
118-
message: `You've previously signed up using ${oppositeProvider}. To continue, please sign in with ${oppositeProvider}.`,
118+
message: `This email is already linked to your ${oppositeProvider} account. To continue, please sign in with ${oppositeProvider}.`,
119119
})
120120
} else if (error) {
121121
setAuthError({

0 commit comments

Comments
 (0)