However, looking at the implementation of getTokenSilently , the redirect_uri from the method argument is never used. Instead, it's either using the global redirect_uri (provided to the Auth0Client constructor) or window.location.origin, see: https://github.com/auth0/auth0-spa-js/blob/master/src/Auth0Client.ts#L365
Solution
I think we have two possible options:
Remove the redirect_uri from the GetTokenSilentlyOptions as it's not used
Description
This GetTokenSilentlyOptions can, optionally, include a redirect_uri. https://github.com/auth0/auth0-spa-js/blob/master/src/global.ts#L181
However, looking at the implementation of getTokenSilently , the
redirect_uri
from the method argument is never used. Instead, it's either using the global redirect_uri (provided to the Auth0Client constructor) orwindow.location.origin
, see: https://github.com/auth0/auth0-spa-js/blob/master/src/Auth0Client.ts#L365Solution
I think we have two possible options:
options.redirect_uri || this.options.redirect_uri || window.location.origin
Let me know if you're open for a PR. I don't mind fixing it.