Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

Auth0 does not publish and end_session_endpoint in their openid-configuration. #1067

Closed
dopry opened this issue Mar 4, 2020 · 11 comments
Closed
Labels

Comments

@dopry
Copy link
Contributor

dopry commented Mar 4, 2020

end_session_endpoint isn't technically required by the OIDC spec, sessions are an optional sub-specification. It would be nice if there were a way to inject the specific missing property into the configuration. Unfortunately the way the getMetadata() method is currently implemented openid-configuration will overwrite any provided meta-data.

More generally it would be nice of the client better handled the signout request if there wasn't an end_session_endpoint available. currently is just throws an exception.

dopry added a commit to dopry/oidc-client-js that referenced this issue Mar 4, 2020
dopry added a commit to dopry/oidc-client-js that referenced this issue Mar 5, 2020
dopry added a commit to dopry/oidc-client-js that referenced this issue Mar 5, 2020
@ayvue
Copy link

ayvue commented Mar 20, 2020

The same situation exists for using Google OAuth2. We catch the error "no end session endpoint" on using the signoutRedirect method during logging out.

@brockallen
Copy link
Member

From my recollection, Auth0's logout endpoint is not conformant to the OIDC end session EP. IOW, theyt don't accept the params as per spec. So my question is then what benefit would doing this metadata merge?

@dgreene1
Copy link

@ghost @dopry, may I ask what your workarounds were?

@dopry
Copy link
Contributor Author

dopry commented Mar 25, 2021

Check out https://github.com/dopry/svelte-oidc/blob/5401fed67175c6cdb512dca788cb2aba7bda8378/src/components/OidcContext.svelte#L83

@dgreene1
Copy link

Thank you so much for documenting the solution @dopry. For future readers, I've also reached out to Auth0 about adding compliance to their roadmap. But until I or someone else replies, we should assume that @dopry's solution is the way to go.

@brockallen
Copy link
Member

I've also reached out to Auth0 about adding compliance to their roadmap.

You'd think they have the budget now.

@dgreene1
Copy link

I've also reached out to Auth0 about adding compliance to their roadmap.

You'd think they have the budget now.

@brockallen I don’t think I’ve laughed that hard in a year. Bravo.

@mellis481
Copy link

@dopry Looking at the solution you linked above, why couldn't/wouldn't you just add the following to the OidcClientSettings you use when creating a new user manager instance via new UserManager(settings):

metadata: {
  authorization_endpoint: "https://sample.auth0.com",
  end_session_endpoint: "https://sample.auth0.com/v2/logout?client_id=SDFKSLFJKLSJFDKJSDF&returnTo=https://myapp.com/loggedout"
}

CC: @brockallen

@dopry
Copy link
Contributor Author

dopry commented Apr 21, 2021

Did it work for you? If so I will look more closely, it would be nice to eliminate the branch in my svelte components.

@mellis481
Copy link

@dopry I will try and let you know. :)

@mellis481
Copy link

@dopry auth0 was down yesterday, but I was able to test seeing if specifying a end_session_endpoint in the client settings metadata would allow me to logout of an auth0 session. And it worked! It took a bit of back and forth because I had to satisfy complaints one by one that not enough metadata was included. Here are the client settings that ultimately worked:

{
  "authority": "https://sample.auth0.com",
  "client_id": "SDFKSLFJKLSJFDKJSDF",
  "response_type": "id_token token",
  "redirect_uri": "https://my-app.com/authorize",
  "scope": "openid profile",
  "post_logout_redirect_uri": "https://my-app.com/loggedout",
  "metadata": {
    "authorization_endpoint": "https://sample.auth0.com/authorize",
    "end_session_endpoint": "https://sample.auth0.com/v2/logout?client_id=SDFKSLFJKLSJFDKJSDF&returnTo=https://my-app.com/loggedout",
    "issuer": "https://sample.auth0.com/",
    "jwks_uri": "https://sample.auth0.com/.well-known/jwks.json",
    "userinfo_endpoint": "https://sample.auth0.com/userinfo"
  }
}

I'm not sure if your endpoints are the same as mine, but I ultimately consulted the .well-known endpoint to see what the correct values were for me.

Hope this helps!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants