siemens / sentry-auth-oidc

OpenID Connect SSO provider for Sentry
Apache License 2.0
69 stars 28 forks source link

Missing id_token in OAuth response #15

Closed jhwhetstone closed 5 years ago

jhwhetstone commented 5 years ago

I'm using the latest Sentry version 9.1.2 and using Keycloak as a provider to login using the authorization_code grant type.

The login appears successful in that the authorization code is exchange for a token, but the response doesn't contain the "id_token" parameter and ultimately fails.

From Sentry:

Missing id_token in OAuth response: {'session_state': '0f3648bd-82e0-41c2-aaf0-771c6893304c', 'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJfTVo0c21ndk9RWF9uZkc3MjZXRTQxSDhnVWxzUEpBM3o5QVdaWDJTRlNRIn0.eyJqdGkiOiJmZWJlOWM3ZS02OWU3LTRhODktYmU0ZC1lNjVlN2NkOThmYTUiLCJleHAiOjE1NjUwNTg0ODAsIm5iZiI6MCwiaWF0IjoxNTY1MDU3NTgwLCJpc3MiOiJodHRwczovL2F1dGguY2kuY2NjdGVjaGNlbnRlci5vcmcvYXV0aC9yZWFsbXMvdGVzdCIsImF1ZCI6InNlbnRyeSIsInN1YiI6ImVmYjk1ZjI2LTk4MzYtNDczMS1hODY4LTFiYTdhMGEwOTg4ZiIsInR5cCI6Ik...

Any ideas?

jhwhetstone commented 5 years ago

Team,

The issue was that I had to create a new scope "openid" and add the scope to my client. Not sure why it works, but it works.

Thanks, James W.