Skip to content
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

logout_url does not include client_id parameter #81

Closed
mbiang opened this issue Jan 30, 2017 · 1 comment
Closed

logout_url does not include client_id parameter #81

mbiang opened this issue Jan 30, 2017 · 1 comment
Assignees
Milestone

Comments

@mbiang
Copy link

mbiang commented Jan 30, 2017

Calling the logout_url method doesn't include client_id parameter in the resulting URL.

According to https://auth0.com/docs/logout, the Client ID parameter specifies the application to log the user out of.

As it stands the following code returns "https://mydomain.auth0.com/logout?returnTo=/". Shouldn't it return "https://mydomain.auth0.com/logout?returnTo=/&client_id=XXXXXXXXXXXX"?

Auth0Client.new(
    client_id: 'XXXXXXXXXXXX', 
    client_secret: 'XXXXXXXXXXXX',
    api_version: 1,
    domain: 'mydomain.auth0.com'
).logout_url('/').to_s

Expected Output: "https://mydomain.auth0.com/logout?returnTo=/&client_id=XXXXXXXXXXXX"
Actual output: "https://mydomain.auth0.com/logout?returnTo=/"

@mbiang mbiang changed the title logout_url does not include client_id parameter. logout_url does not include client_id parameter Jan 30, 2017
@rjocoleman
Copy link

I got caught with this too. My logout request was producing an auth0 error page because the returnTo URL wasn't whitelisted.

I had it whitelisted returnTo at the client level in the auth0 web interface, which requires the client_id set.

As a workaround the returnTo can be whitelisted for all clients, at the account level (which is required when client_id is not set. https://manage.auth0.com/#/account/advanced

These docs have some additional detail: https://auth0.com/docs/logout#redirect-users-after-logout

@joshcanhelp joshcanhelp self-assigned this Jun 14, 2018
@joshcanhelp joshcanhelp added this to the v4-Next milestone Jun 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants