mirror of
https://github.com/cfngc4594/monaco-editor-lsp-next.git
synced 2026-10-15 15:17:29 +00:00
feat(auth): modify signIn logic to prevent redirect after credentials sign-in
This commit is contained in:
@@ -33,7 +33,7 @@ export async function signInWithCredentials(formData: CredentialsSignInFormValue
|
||||
throw new Error("Incorrect password.");
|
||||
}
|
||||
|
||||
await signIn("credentials", formData);
|
||||
await signIn("credentials", { ...formData, redirect: false });
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
return { error: error instanceof Error ? error.message : "Failed to sign in. Please try again." };
|
||||
|
||||
Reference in New Issue
Block a user