OIDC silent login failure

  • 1 November 2022
  • 6 replies

Hello, I'm working on setting up OIDC for our instance.

Unfortunately it isn't working but I can't debug the issue from the GD side.

Here is the organization configuration:


    "data": {

    "id": "<myorgid>",

    "type": "organization",

    "attributes": {

        "name": "WizeHive",

        "hostname": "",

        "oauthIssuerLocation": "https://<>/",

        "oauthClientId": "jQPiFIaePpt5EQDav00zha_XvPmku2-SltwKcy79-tk",

        "oauthClientSecret": "<secret>"




Much of the login process appears to succeed. 

Here is a summary of the requests to the OIDC provider:

GET /.well-known/openid-configuration
200 - OK

GET /oauth/authorize?response_type=code&client_id=jQPiFIaePpt5EQDav00zha_XvPmku2-SltwKcy79-tk&scope=openid%20profile&state=RorYXYYc2SsLpFW1w-h9-gjYPQvNxoRRb6Fh6hsjGQY%3D&
200 - OK

POST /oauth/authorize
post body:
302 Location

GET /.well-known/openid-configuration
200 - OK

POST /oauth/token
200 - OK
Posted token:

  "access_token": "2EVEak5k67gTVt5kjjI2nIpL_lBuXuGM3bp9QSP_m5k",

  "token_type": "Bearer",

  "expires_in": 7200,

  "scope": "openid profile",

  "created_at": 1667195403,

  "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6InBkV29RZUdGbkZrdW96X19yU2ZfMW4tblFjdjRCVzd4b2E3RmF5Rk11aUUifQ.eyJpc3MiOiJodHRwczovL3d3dy5zaGFyZS5iZnFhLm9yZy8iLCJzdWIiOiI1MmUwYmZhMTQ2ZjUxYWZlZWQxMDE3MDY3NmEzMWE1MGZmYTAyNTFkZWMzZDIxOTMzNTNiYmNjYzg0NWZiM2RiIiwiYXVkIjoialFQaUZJYWVQcHQ1RVFEYXYwMHpoYV9YdlBta3UyLVNsdHdLY3k3OS10ayIsImV4cCI6MTY2NzE5NTUyMywiaWF0IjoxNjY3MTk1NDAzLCJhdXRoX3RpbWUiOjE2NjcxOTU0MDN9.H2Nv7NrX7IoPvpXgh2o6T6Y7fx-nnjFSxVfsfTfQJS6wmLP-7-vvj_-PTHOvVSComib4aDkBUbyXdOFdiU6LrDGKG4jx16SxUnkoCk2T9baPsXTMn0dFK6SysWHdBexMZigN54gCFkRuY_Una8f_gWoy-vheytqvxCOC_N7ZEIQ5cWAqvYWF92V7vZhqAp4e4ImvYxLtIAHuxATJCXUzvnOPIk9D3sXeTcHw-nHhZiE-_G2L_GNyiw6Aq5o6PI4j_ICBdhedlwg220pR89CbSpsl1BeO6dVQY6T523JYqTNxT9HHU716klBytZE8oHc8kI7wwPUEmZv2bRJip7P4qA"


GET /oauth/discovery/keys
200 - OK

After this point my browser is at with a 401 error

What is happening after the last post to the /token endpoint that is causing the login to fail?


Best answer by Peter Plochan 4 November 2022, 16:13

View original

6 replies

Userlevel 3

Hello Scott,

Could you provide response headers from this last 401 response?

There should be WWW-Authenticate header, which could probably explain the reason of the error. If there’s no such header, we need to investigate the problem further.

Just quick question what OIDC provider are you using? This could help as well.

www-authenticate: Unable to authenticate: error: [invalid_nonce]

We are using the Ruby gems doorkeeper and doorkeeper-openid_connect. We are not able to use a third party openid service.

Hi @scott.jacobsen,

the invalid_nonce error code from the www-authenticate header means there was a problem with the nonce parameter. Our GD backend expects a proper value of this parameter which must be located within the ID Token returned by the OIDC provider.

Does your “doorkeeper-openid_connect” support sending this parameter? I’ve found some mention about enabling nonces in the related GitHub README, but I’m not sure if it will help. Could you try it?

More info about the nonce within the OIDC standard:

OPTIONAL. String value used to associate a Client session with an ID Token, and to mitigate replay attacks. The value is passed through unmodified from the Authentication Request to the ID Token. Sufficient entropy MUST be present in the nonce values used to prevent attackers from guessing values. For implementation notes, see Section 15.5.2.


I managed to fix the nonce issue - now it does appear the login works (as far as I can tell)

Here is the jwt token with the nonce:


The final call is to the userinfo endpoint, which returns 




name:"Gerken Wever"








Then it redirects to which returns a 200, but the screen just says “Unknown Error” “We’re not quite sure what went wrong”


According to our logs, it seems there’s a missing name claim in the ID token. The GD backend uses the ID token for getting a user info (name) of the already authenticated session instead of the userinfo endpoint.

Could you, please, try to add at least the name claim to the ID token as well? It seems there’s a how-to in the already mentioned doorkeeper’s README.

Thanks! That was the final piece of the puzzle. Login appears to be working.