auth0-react icon indicating copy to clipboard operation
auth0-react copied to clipboard

Does this library hardcode the token URL to end in /oauth/token? How can I specify customized token URLs?

Open the-kodiak opened this issue 5 years ago • 1 comments

Describe the problem you'd like to have solved

I'm trying to use this brilliant library with a different identity provider whose token URL does NOT end in /oauth/token, but rather xxx/token. I was able to use auth0-spa-js because it only required the token URL to end in /token, so including xxx as part of my domain parameter made it work.

Unfortunately, I can't seem to get the same idea to work with auth0-react, even though when I search the codebase, I see no hardcoding of /oauth/token.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Use the same requirements as auth0-spa-js rather than imposing the token URL end in /oauth/token, or have some other method of setting a custom Token URL.

A clear and concise description of what you want to happen.

No known workaround that I could find on the community forum or Github.

A clear and concise description of any alternatives you've considered or any work-arounds that are currently in place.

Abandon using the library?

the-kodiak avatar May 01 '21 00:05 the-kodiak

Hey @mtttcgcg,

This SDK uses auth0-spa-js under the hood, which does use a hardcoded oauth/token, and not /token as you mentioned: https://github.com/auth0/auth0-spa-js/blob/master/src/api.ts#L25.

The intention of this SDK, as well as our auth0-spa-js, is to be used with Auth0 and not with any other identity provider as that is not supported.

Keep in mind that, apart from the oauth/token URL, there may be additional things built-in that are Auth0 specific, which is why we do recommend you to try and use different SDKs when not using Auth0.

frederikprijck avatar May 03 '21 10:05 frederikprijck