Function createAuth0Client

  • Online mode requires useRefreshTokens: true and useDpop: true, enforced here at compile time. Dynamic values, casts, and plain JS are covered by the runtime check in the Auth0Client constructor.

    Parameters

    • options: Auth0ClientOptions & {
          refreshTokenMode: "online";
          useDpop: true;
          useRefreshTokens: true;
      }

    Returns Promise<Auth0Client>

  • Asynchronously creates the Auth0Client instance and calls checkSession.

    Note: There are caveats to using this in a private browser tab, which may not silently authenticate a user on page refresh. Please see the checkSession docs for more info.

    Parameters

    • options: Auth0ClientOptions & {
          refreshTokenMode?: "offline";
      }

      The client options

    Returns Promise<Auth0Client>

    An instance of Auth0Client