UNPKG

react-native-msal-plugin

Version:

React Native Plugin that wraps Microsoft MSAL library allowing you to authenticate with azure B2C

15 lines (14 loc) 947 B
import { IAuthenticationResult, IPolicies } from "./MsalPluginInterfaces"; import { MsalUIBehavior } from "./MsalUIBehavior"; export default class MsalPlugin { private authority; private clientId; private policies; private defaultPolicy; constructor(authority: string, clientId: string, policies?: IPolicies); acquireTokenAsync: (scopes: string[], extraQueryParameters?: Record<string, string>, loginHint?: string, msalUIBehavior?: MsalUIBehavior, extraScopesToConsent?: string[]) => IAuthenticationResult; acquireTokenSilentAsync: (scopes: string[], userIdentifier: string, forceRefresh?: boolean) => Promise<IAuthenticationResult>; tokenCacheDelete: () => Promise<boolean>; resetPasswordAsync: (scopes: string[], extraQueryParameters?: Record<string, string>, loginHint?: string, msalUIBehavior?: MsalUIBehavior, extraScopesToConsent?: string[]) => Promise<IAuthenticationResult>; private getAuthority; }