@openpass/openpass-js-sdk
Version:
OpenPass SSO JavaScript SDK
49 lines (48 loc) • 1.43 kB
TypeScript
import { SignInClientState, RedirectSignInOptions, PopupSignInOptions } from "../types";
export type SignInState = {
state: string;
clientId: string;
redirectUrl?: string;
codeChallenge: string;
codeChallengeMethod: string;
codeVerifier: string;
originatingUri: string;
clientState?: SignInClientState;
};
export type SignInSource = "Custom" | "SignInWithOpenPassButton" | "SignInWithOpenPassInlineForm" | "SignInWithOpenPassQuickAuth";
export type InternalRedirectSignInOptions = RedirectSignInOptions & {
source: SignInSource;
};
export type InternalPopupSignInOptions = PopupSignInOptions & {
source: SignInSource;
};
export type AuthRedirectUrlParams = {
state: string | null;
code?: string | null;
error: string | null;
errorDescription: string | null;
errorUri: string | null;
};
export type AuthCodeMessageResponse = {
source?: string;
state?: string;
code?: string;
error?: string;
errorDescription?: string;
errorUri?: string;
};
export type AuthSession = {
state: string;
clientId: string;
redirectUrl?: string;
codeChallenge: string;
codeChallengeMethod: string;
codeVerifier: string;
originatingUri: string;
clientState?: SignInClientState;
responseMode?: string;
loginHint?: string;
disableLoginHintEditing?: boolean;
useSilentAuth?: boolean;
allowUnverifiedEmail?: boolean;
};