Skip to Content
Configuring the client

Configuring the client

Every option createAuth takes, with a page for each part of the client you can configure.

createAuth builds the client from a few options. This section explains each one, for when the defaults in Getting started no longer fit your app.

Options

createAuth takes three required options and five optional ones:

OptionRequiredWhat it sets
nameYesThe storage namespace: letters, digits, _ or -. Keeps two apps on one origin apart.
userYesA user schema, or fromAccessToken.
storageYesWhere the session is saved.
refreshNoHow to get new tokens. Without it, an expired token signs the user out.
revokeNoRevokes the ended tokens on your backend after a sign-out.
maxAgeNoHow long a saved session can be restored, in seconds. Default: 30 days, counted again from each save.
debugNoReports what the client does. Default: off.
lockingNoRestores a saved session as locked, for native apps. Default: off.

Pages in this section

Each page covers one part of the client: how it checks users, gets new tokens, saves the session, follows other tabs, and reports what happens.

On this page