achedeuzot / ueberauth_auth0

Auth0 OAuth2 strategy for Überauth.
https://hexdocs.pm/ueberauth_auth0
MIT License
71 stars 46 forks source link

Scopes from Auth0 are returned as a space-delimited list #232

Closed adammohammed closed 1 year ago

adammohammed commented 1 year ago

I noticed when trying to fetch the scopes using this strategy that the scopes in both the /token response and in the JWT from auth0 are space delimited, but the credentials object tries to String.split/3 with comma as the delimiter.

For example, the response contains "scope": "openid profile email" and the credential scopes are: credential.scopes = [ "openid profile email"], I think the expected result should be credential.scopes = ["openid", "profile", "email"]

achedeuzot commented 1 year ago

Indeed, good catch. I'll merge it soon ;)

achedeuzot commented 1 year ago

Fixed by #233