-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when calling /oidc/callback #204
Comments
After some debugging I see the module retrieving a RS256 JWT from Microsoft, but then trying to verify it with the provided client secret, which of course will fail: https://github.com/mozilla/mozilla-django-oidc/blob/master/mozilla_django_oidc/auth.py#L123 Even without this check, it eventually fails when comparing the JWT's alg (RS256) with Maybe I'm massively misunderstanding things, but I was under the impression that the client secret was only used to request the JWT. Why is the code above trying to verify the retrieved JWT against that secret? |
I'm running into this exception as well using Auth0. Looks like #198 is the same issue. |
@gdestuynder Can you help out here. You helped me with this by changing something about the key in Auth0's config. I was getting a similar error, and you you changed something it started to work. |
I believe the exception is masking the fact that the Provider is returning an RS256 token, but mozilla-django-oidc, by default is looking for an HS256 token. I was able to get to work by either configuring my provider to return HS256 or configuring mozilla-django-oidc to use RS256 (that took a bit more work). |
Making the choice of 'HS256' vs. 'RS256' is subtly part of this: #179 |
what johnpaulett said :) |
@nfvs You can change the algorithm by setting If that turns out to be true, the error is a horrible way to figure out what's wrong. Ideas to solve that? |
@peterbe after some debugging sessions I eventually reached that conclusion as well :-) However changing the algo merely triggered another problem so I ended up using something else. Feel free to close this if you think this is working properly. |
I fixed this by now providing a |
Using Microsoft's servers triggers this exception:
Running in python 3.6, using these versions:
The text was updated successfully, but these errors were encountered: