mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
fix(saml): reject signInWithSaml when redirectMethod is "none"
Previously the call would no-op the redirect and then await neverResolve(), hanging the caller forever. Throw an explicit error instead so the misuse surfaces immediately.
This commit is contained in:
parent
be4560b416
commit
fdfc400027
@ -2866,6 +2866,9 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
|
||||
if (typeof window === "undefined") {
|
||||
throw new Error("signInWithSaml can currently only be called in a browser environment");
|
||||
}
|
||||
if (this._redirectMethod === "none") {
|
||||
throw new Error("signInWithSaml requires a redirectMethod that performs navigation; got 'none'");
|
||||
}
|
||||
this._ensurePersistentTokenStore();
|
||||
const currentUrl = new URL(window.location.href);
|
||||
const afterCallbackRedirectUrl = options.returnTo != null
|
||||
|
||||
Loading…
Reference in New Issue
Block a user