Skip to content

Commit

Permalink
docs: logout info about auth0 (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcnzer authored and pi0 committed Jun 13, 2019
1 parent 3f417ae commit ba09118
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/providers/auth0.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,23 @@ User will be redirected to a page like this:
You can get your `client_id` and `domain` the Settings section for your client in the [Auth0 API dashboard](https://manage.auth0.com/#/applications). Your audience is defined on your [client's API](https://manage.auth0.com/#/apis).

<img align="center" src="https://cdn2.auth0.com/docs/media/articles/dashboard/client_settings.png">

## Logout with new Auth0 tenants

Auth0 tenants created in 2018 and earlier had an optional tenant setting `Enable Seamless SSO`. This setting is automatically enabled for new tenants and cannot be disabled.

If enabled and a user logs out and logs back in a short while later, they will not need to re-enter their credentials. They'll be logged in automatically.

You can force Auth0 to present the login page:
* Go to into the `Tenant Settings` > `Advanced`
* In `Allowed Logout URLs` enter the allowed URL(s) you can redirect to, such as `http://localhost:3000`

Wherever you have a logout feature do two things:
1. run the logout command
```js
this.$auth.logout()
```
2. redirect the user to the Auth0 logout URL along with a `returnTo` parameter
```
https://mytenant.auth0.com/v2/logout?returnTo=http%3A%2F%2Flocalhost:3000
```

0 comments on commit ba09118

Please sign in to comment.