Interface RedirectLoginOptions<TAppState>

interface RedirectLoginOptions {
    appState?: TAppState;
    authorizationParams?: AuthorizationParams;
    fragment?: string;
    openUrl?: ((url) => void | Promise<void>);
}

Type Parameters

Hierarchy

  • Omit<SPARedirectLoginOptions<TAppState>, "onRedirect">
    • RedirectLoginOptions

Properties

appState?: TAppState

Used to store state before doing the redirect

authorizationParams?: AuthorizationParams

URL parameters that will be sent back to the Authorization Server. This can be known parameters defined by Auth0 or custom parameters that you define.

fragment?: string

Used to add to the URL fragment before redirecting

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

Type declaration

    • (url): void | Promise<void>
    • Used to control the redirect and not rely on the SDK to do the actual redirect.

      Parameters

      • url: string

      Returns void | Promise<void>

      Example

      const client = new Auth0Client({
      openUrl(url) {
      window.location.replace(url);
      }
      });

      Example

      import { Browser } from '@capacitor/browser';

      const client = new Auth0Client({
      async openUrl(url) {
      await Browser.open({ url });
      }
      });