logout

client.logout({
  redirectTo: string,
  removeCredentials: boolean,
  // optional arguments
  state: string,
  revocationParams: string[]
})

About this command

Kill the current user’s SSO session.

Use the Revoke refresh token endpoint to invalidate all active user tokens on a specific client_id.

Examples

client.logout({
  redirectTo: 'https://my-site.com/logout',
  state: 'L2ZyL3BhZ2U=',
  revocationParams: ['eyJ..V1QiL']
})

Parameters

Parameter Description

redirectTo string

The URL to which the user is redirected afterward. This URL must be whitelisted in the Allowed logout callback URLs field of your ReachFive Console SSO settings (Security  SSO). Whitelisted URLs can be used with all account identity clients.

state string

Optional. An opaque value that ReachFive returns as-is as the state query parameter on the post-logout redirect URL.

The recommended format for state is Base64.

Use state to encode the original page (for example, path and language) so you only need to whitelist one logout callback URL. Your application then decodes state and performs the final redirect to that page.

If no redirect occurs, state is ignored.

revocationParams string

An array of strings that is used to pass any access or refresh tokens that should be invalidated after a logout.

This parameter can only be used with an OAuth2 public client.

removeCredentials boolean

Delete the user credentials with the Credentials Management API. See loginWithCredentials for more on logging in with credentials.

Defaults to false.

This feature is experimental, please check your browser compatibility.

Response

Type: Promise[void]

R5 AI Assistant

Confirm Deletion