UNPKG

@passageidentity/passage-react-native

Version:

Passkey Complete for React Native - Go completely passwordless with a standalone auth solution in your React Native app with Passage by 1Password

65 lines (55 loc) 1.95 kB
"use strict"; import { PassageApp, PassageCurrentUser, PassageHosted, PassageMagicLink, PassageOneTimePasscode, PassagePasskey, PassageSocial, PassageTokenStore } from "./index.js"; import { PassageReactNative } from "./shared/index.js"; /** * The Passage class used to perform register and login operations. * The only parameter is the app handle for the application. * * @example * ``` * import Passage from '@passageidentity/passage-react-native'; * const passage = new Passage(app_id); * ``` */ export class Passage { /** * PassageApp class contains functions that operate on the Passage app level. */ /** * PassagePasskey class contains functions that use passkeys for authentication. */ /** * PassageMagicLink class contains functions that use magic links for authentication. */ /** * PassageOneTimePasscode class contains functions that use one-time passcodes for authentication. */ /** * PassageSocial class contains functions that use social providers for authentication. */ /** * PassageSocial class contains functions that use social providers for authentication. */ /** * The PassageSession class used to manage Passage sessions using refresh tokens. */ /** * The PassageCurrentUser class contains functions to get information about the currently authenticated user. */ /** * Constructor configuring the Passage class' attributes * @param {string} appId the App's corresponding AppId */ constructor(appId) { PassageReactNative.initWithAppId(appId); this.app = new PassageApp(); this.passkey = new PassagePasskey(); this.magicLink = new PassageMagicLink(); this.oneTimePasscode = new PassageOneTimePasscode(); this.social = new PassageSocial(); this.hosted = new PassageHosted(); this.tokenStore = new PassageTokenStore(); this.currentUser = new PassageCurrentUser(); } } //# sourceMappingURL=Passage.js.map