UNPKG

bento-auth-js

Version:

Authentication library for web applications of Bento-Platform

11 lines (10 loc) 1.04 kB
export declare const LS_SIGN_IN_POPUP = "BENTO_DID_CREATE_SIGN_IN_POPUP"; export declare const LS_BENTO_WAS_SIGNED_IN = "BENTO_WAS_SIGNED_IN"; export declare const LS_BENTO_POST_AUTH_REDIRECT = "BENTO_POST_AUTH_REDIRECT"; export declare const createAuthURL: (authorizationEndpoint: string, clientId: string, authCallbackUrl: string, scope?: string) => Promise<string>; export declare const performAuth: (authorizationEndpoint: string, clientId: string, authCallbackUrl: string, scope?: string) => Promise<void>; export declare const usePerformAuth: () => () => Promise<void>; export type AuthCodeCallbackFunction = (code: string, verifier: string) => Promise<void>; export declare const setLSNotSignedIn: () => void; export declare const useHandleCallback: (callbackPath: string, onSuccessfulAuthentication: (() => Promise<unknown>) | (() => unknown), authCodeCallback: AuthCodeCallbackFunction | undefined, uiErrorCallback: (message: string) => void) => void; export declare const checkIsInAuthPopup: (applicationUrl: string) => boolean;