Sign out and revoke

What signing out of your application ends, how to revoke onefold tokens, and every event that ends your application's access to a user.

Signing a user out of your application means ending your own session and revoking the tokens you hold for them. It does not sign the user out of onefold.

What exists, and who ends it

ThingWhat it isWho ends it
Your sessionYour application's own cookie or session recordYou
Access tokenLets you read the user's claims for up to its lifetimeYou, by revoking it, or it expires
Refresh tokenLets you obtain new access tokensYou, by revoking it, or it expires
GrantThe user's approval of your applicationThe user, or you from the developer portal
onefold sessionThe user's sign-in on onefold itselfThe user

Sign a user out

Revoke the refresh token

Revoking the refresh token also ends the access token issued with it.

curl -X POST https://onefold.eitozx.com/o/revoke_token/ \
  -d token=REFRESH_TOKEN \
  -d token_type_hint=refresh_token \
  -d client_id=YOUR_CLIENT_ID \
  -d client_secret=YOUR_CLIENT_SECRET

End your own session

Delete your session and its cookie.

The revocation endpoint

POST https://onefold.eitozx.com/o/revoke_token/, form-encoded:

ParameterValue
tokenThe access token or refresh token to revoke
token_type_hintOptional. access_token or refresh_token. A wrong or missing hint does not prevent the revocation.
client_idYour client ID
client_secretConfidential clients only

A revoked refresh token is refused immediately. The 10-second retry window of refresh token rotation does not apply to a token you revoke.

The revocation endpoint is not rate limited, so that a leaked token can always be revoked.

There is no end-session endpoint

onefold does not support RP-initiated logout. The discovery document has no end_session_endpoint, and no request from your application ends the user's session on onefold.

After signing out of your application, a user who starts a new sign-in may still have a session on onefold and skip the sign-in page.

When access ends

Your application's tokens for a user stop working when:

  • they expire;
  • you revoke them at the revocation endpoint;
  • the user removes your application from their authorized applications;
  • you revoke the user's grant on the application's Users tab;
  • the user resets their password through account recovery, which ends every application's tokens for that user;
  • the user's account is disabled;
  • the user's account is held, for as long as that lasts;
  • the user's email address is not verified. Confirming it ends the grant. See Accounts that can no longer sign in;
  • your application is deleted.

Each of these takes effect at once. A revoked or expired access token is refused like any invalid token, and a refresh answers invalid_grant. Send the user through sign-in again.

Rotating the client secret or changing the client type does not revoke tokens. Neither does moving your application to another organization: its tokens keep working, and the new organization's security policy applies from each token's next refresh.

On this page