You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1477,45 +1473,6 @@ Once an enterprise connection has the option enabled, `getSession()` / `getUser(
1477
1473
- The connection must be an `okta` or `oidc` enterprise connection with `id_token_session_expiry_supported: true` (Dashboard toggle "Use ID Token for Session Expiry", Management API, or Terraform).
1478
1474
- Authorization Code flow.
1479
1475
1480
-
## Revoking a Refresh Token
1481
-
1482
-
Revoking a refresh token invalidates it at Auth0 so it can no longer be used to obtain new access tokens.
1483
-
This is useful when implementing secure logout flows or when a user's session needs to be forcibly terminated.
1484
-
1485
-
Revocation requires the application to have been granted `offline_access` scope so Auth0 issues a refresh token, and the target API must have **Allow Offline Access** enabled.
1486
-
1487
-
> **Note:** Revocation does not affect access tokens that have already been issued. They remain valid until their expiry. For immediate session termination, combine revocation with `logout()`.
1488
-
1489
-
### Revoking the session token
1490
-
1491
-
When called without arguments, `revokeRefreshToken()` reads the refresh token directly from the current session:
1492
-
1493
-
```ts
1494
-
awaitserverClient.revokeRefreshToken();
1495
-
```
1496
-
1497
-
If no session exists or the session has no refresh token, a `MissingSessionError` is thrown.
1498
-
1499
-
### Revoking an explicit token
1500
-
1501
-
A specific token can be passed via `options.token`, bypassing the session lookup:
`logout()` automatically revokes the session's refresh token before clearing the local session.
1510
-
Revocation is best-effort: if it fails for any reason (network error, token already revoked, misconfiguration), logout still proceeds. In resolver mode, both revocation and local session deletion only occur when the stored session domain matches the resolved domain — if they differ, the session belongs to a different tenant and is left untouched.
1511
-
1512
-
```ts
1513
-
constlogoutUrl=awaitserverClient.logout({
1514
-
returnTo: 'http://localhost:3000',
1515
-
});
1516
-
// Redirect user to logoutUrl
1517
-
```
1518
-
1519
1476
## Logout
1520
1477
1521
1478
Logging out ensures the stored tokens and user information are removed, and that the user is no longer considered logged-in by the SDK.
0 commit comments