auth0 / auth0-spa-js

Auth0 authentication for Single Page Applications (SPA) with PKCE
MIT License
904 stars 358 forks source link

Redirect_URL in GetTokenSilentlyOptions is unused #291

Closed frederikprijck closed 4 years ago

frederikprijck commented 4 years ago

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) 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:

Let me know if you're open for a PR. I don't mind fixing it.

stevehobbsdev commented 4 years ago

Let's close this and continue the discussion in #287