PassageAuth

Renders the passage-auth element (opens in a new tab).

src/login.tsx
import React from 'react';
import { PassageAuth } from '@passageidentity/passage-react';
 
export const AuthPage: React.FC = () => {
    return (
        <>
            <h1>Example Login or Register Page</h1>
            <PassageAuth />
        </>
    );
};

Props

NameRequiredTypeDescription
appIdNo*stringYour Passage app id.
defaultCountryCodeNo*stringISO Country code
langNo*stringDefault language
beforeAuthNoBeforeAuthCallbackMethod to call before authentication
onSuccessNoOnSuccessCallbackCallbackMethod to call on authentication success
onEventNoOnEventCallbackMethod to call on a defined set of events in element
tokenStoreNoTokenStoreCustom token store instance
themeNo"light", "dark", "auto"Use a light, dark, or auto theme

*Note: If not using the PassageProvider the appId property is required. If using the PassageProvider appId, defaultCountryCode, and lang props will be loaded from the PassageProvider but if passed in will override the values for this component instance only.