@slashid/react
Version:
React SDK for the /id platform
15 lines • 935 B
TypeScript
import { AnonymousUser, User } from "@slashid/slashid";
export declare const LEGACY_STORAGE_TOKEN_KEY = "@slashid/USER_TOKEN";
export declare const STORAGE_TOKEN_KEY: (oid: string) => string;
export declare const ORG_SWITCHING_FLAG_KEY = "@slashid/ORG_SWITCHING_FLOW";
export declare function getStorageKeyForOrgSwitchingUser(user: User | AnonymousUser): string | undefined;
/**
* When using SSO in org switching flows with Home Realm Discovery,
* redirect UX mode will cause the SDK not to switch to the proper org upon returning to the redirect URL.
*
* To fix that, we raise a flag in session storage and ensure the flow is done once we load the page again.
*/
export declare function raiseOrgSwitchingFlag(): void;
export declare function clearOrgSwitchingFlag(): void;
export declare function shouldResumeOrgSwitchingFlow(oid: string, user: User | AnonymousUser | undefined | null): boolean;
//# sourceMappingURL=org.d.ts.map