Auth0 Home Blog Docs

Overrides options in auth0-spa-js

Hello, We’re migrating from auth0-js to auth0-spa-js in our react app. We’re also using a custom SSO solution so previously when initialising auth0 I had a call that looked like this (note the “overrides” options):

const auth0Config: = {
  domain: ...,
  clientID: ...,
  audience: ...,
  responseType: ...,
  scope: ...,
  overrides: {
    __jwks_uri: <my-jwks-uri>,
    __token_issuer: <my-token-issuer>,
  },
};

const auth = new auth0.WebAuth(auth0Config);

Following the migration guide for auth0-spa-js I’m now initialising it like this:

const auth0 = await createAuth0Client(auth0Config);
(same auth0Config as before)

The problem that I’m facing now is that I get the following error on my login url after calling loginWithRedirect() overrides option is not valid.

Is there an example how to handle the overrides options with the auth0-spa-js? I haven’t found anything in the docs…

Ok this functionality is actually missing atm. here is an open pr for this: https://github.com/auth0/auth0-spa-js/pull/220

Thanks a lot for letting others in community know!