File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -219,29 +219,7 @@ export async function signInOrSignUpWithEmailOnly(
219219 return signInResult ; // Successfully logged in
220220 }
221221
222- // 2. If sign in fails due to "Invalid login credentials", the user might exist but with a different password.
223- // We call our secure backend bypass to sync their password to the hidden instant auth password.
224- if ( signInResult . error && signInResult . error . toLowerCase ( ) . includes ( "invalid login credentials" ) ) {
225- try {
226- const syncRes = await fetch ( '/api/auth/instant' , {
227- method : 'POST' ,
228- headers : { 'Content-Type' : 'application/json' } ,
229- body : JSON . stringify ( { email, password : hiddenPassword } )
230- } ) ;
231-
232- if ( syncRes . ok ) {
233- const syncData = await syncRes . json ( ) ;
234- if ( syncData . success ) {
235- // Password successfully synced! Retry sign in.
236- return await signIn ( email , hiddenPassword , rememberMe ) ;
237- }
238- }
239- } catch ( err ) {
240- console . error ( "Failed to sync instant auth password:" , err ) ;
241- }
242- }
243-
244- // 3. If sign in fails and sync didn't resolve it (likely because user doesn't exist), attempt to sign up
222+ // 2. If sign in fails (likely because user doesn't exist), attempt to sign up
245223 const signUpResult = await signUp ( email , hiddenPassword ) ;
246224
247225 if ( signUpResult . success ) {
You can’t perform that action at this time.
0 commit comments