@auth0/auth0-react
    Preparing search index...

    Interface RedirectConnectAccountOptions<TAppState>

    interface RedirectConnectAccountOptions<TAppState = any> {
        appState?: TAppState;
        authorization_params?: AuthorizationParams;
        connection: string;
        openUrl?: (url: string) => Promise<void>;
        redirectUri?: string;
    }

    Type Parameters

    • TAppState = any
    Index

    Properties

    appState?: TAppState

    Optional application state to persist through the transaction.

    await auth0.connectAccountWithRedirect({
    connection: 'google-oauth2',
    appState: { returnTo: '/settings' }
    });
    authorization_params?: AuthorizationParams

    Additional authorization parameters for the request.

    await auth0.connectAccountWithRedirect({
    connection: 'google-oauth2',
    authorization_params: {
    scope: 'https://www.googleapis.com/auth/calendar'
    access_type: 'offline'
    }
    });
    await auth0.connectAccountWithRedirect({
    connection: 'github',
    authorization_params: {
    scope: 'repo user',
    audience: 'https://api.github.com'
    }
    });
    connection: string

    The name of the connection to link (e.g. 'google-oauth2').

    openUrl?: (url: string) => Promise<void>

    Optional function to handle the redirect URL.

    await auth0.connectAccountWithRedirect({
    connection: 'google-oauth2',
    openUrl: async (url) => { myBrowserApi.open(url); }
    });
    redirectUri?: string

    The URI to redirect back to after connecting the account.