UNPKG

@criipto/verify-expo

Version:

Accept MitID, NemID, Swedish BankID, Norwegian BankID and more logins in your Expo (React-Native) app

39 lines 1.3 kB
/// <reference types="react" /> export declare const actions: readonly ["confirm", "accept", "approve", "sign", "login"]; export type Action = (typeof actions)[number]; export type Claims = { iss: string; aud: string; identityscheme: string; authenticationtype: string; sub: string; iat: number; exp: number; [key: string]: string | number; }; export declare class OAuth2Error extends Error { error: string; error_description?: string; state?: string; constructor(error: string, error_description?: string, state?: string); } export declare class UserCancelledError extends OAuth2Error { constructor(); } export type AcrValues = "urn:grn:authn:se:bankid:same-device" | string; export interface CriiptoVerifyContextInterface { login: (acrValues: AcrValues, redirectUri: string, params?: { scope: string; login_hint: string; preferEphemeralSession?: boolean; }) => Promise<{ id_token: string; claims: Claims; } | OAuth2Error | Error>; logout: () => Promise<void>; claims: Claims | null; error: Error | OAuth2Error | null; } declare const CriiptoVerifyContext: import("react").Context<CriiptoVerifyContextInterface>; export default CriiptoVerifyContext; //# sourceMappingURL=context.d.ts.map