File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -87,13 +87,13 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
8787 useEffect ( ( ) => {
8888 const token = searchParams . get ( 'access_token' )
8989 const provider = searchParams . get ( 'provider' )
90+ const oppositeProvider = provider === 'google' ? 'Github' : 'Google'
9091 connectTheUser ( token , provider ) . catch ( ( error ) => {
9192 openAuthModal ( )
9293 console . log ( 'error' , error )
9394 if ( error && error . code === 'auth/account-exists-with-different-credential' ) {
9495 setAuthError ( {
95- message :
96- 'This account is already connected with a different provider. Please sign in with that provider to continue.' ,
96+ message : `You've previously signed up using ${ oppositeProvider } . To continue, please sign in with ${ oppositeProvider } .` ,
9797 } )
9898 } else {
9999 setAuthError ( {
You can’t perform that action at this time.
0 commit comments