github auth0/auth0-spa-js v1.7.0-beta.1

latest releases: v2.1.3, v2.1.2, v2.1.1...
pre-release4 years ago

Added

  • Ability to use either an in-memory cache (the default) or localstorage to store tokens - stevehobbsdev - #303
  • Added support for rotating refresh tokens - stevehobbsdev - #315

New cache location options

By default, auth0-spa-js will store tokens in memory. We have now added a second option, allowing you to store tokens in local storage. This has the benefit of being able to persist tokens across page refreshes.

The storage strategy can be configured using the option cacheLocation when invoking createAuth0Client:

const auth0 = await createAuth0Client({
    domain: '<your Auth0 domain>',
    client_id: '<your Auth0 client ID>',
    cacheLocation: 'localstorage'
});

The cacheLocation option can be set to one of two values: memory, or localstorage.

Note: Please be aware that configuring the SDK to store tokens in local storage could leave your tokens vulnerable in the event of an XSS attack.

Don't miss a new auth0-spa-js release

NewReleases is sending notifications on new releases.