For the complete documentation index, see llms.txt. This page is also available as Markdown.

👮Disabeling token persistance

By default, oidc-spa saves tokens in session storage, allowing users to skip the silent sign-in process when they reload your app (CTRL + R). However, token persistence can be disabled, and everything will still function as expected. The only difference is that reloading the app may take slightly longer.

import { createOidc } from "oidc-spa";

const oidc = await createOidc({
  // ...
  doDisableTokenPersistence: true
});
import { createReactOidc } from "oidc-spa/react";

export const {
    OidcProvider,
    useOidc
} = createReactOidc({
    // ...
    doDisableTokenPersistence: true
})

Last updated

Was this helpful?