Skip to main content
Signing out has two directions:
  • Your app signs the person out of Aiveth (OpenID Connect RP-Initiated Logout). The person leaves your app and their Aiveth session ends.
  • Aiveth tells your app that someone signed out (OpenID Connect Back-Channel Logout). When an Aiveth session ends, for any reason, Aiveth posts a signed notice to your server.

Set up sign-out for an app

1

Open the app

In the console, open Apps and select the app.
2

Add sign-out return addresses

Under Signing out → After sign-out, back to, add one address per line, for example https://hr.acme.com/signed-out. After signing out through Aiveth, people come back only to one of these.
3

Add a back-channel address (optional)

Under Tell the app when someone signs out, add the address where your server receives notices, for example https://hr.acme.com/aiveth/signed-out. It must be a public https address.
4

Save

Select Save.

Sign the person out from your app

Send the browser to the end-session endpoint, with GET or a form POST:
string
An ID token Aiveth issued to your app for this person. An expired one is fine. It proves the request is genuine.
string
Your client ID. If you send both, it must match the aud of the ID token. If you leave it out, Aiveth takes it from the ID token.
string
Where to send the person afterwards. It must match one of the app’s After sign-out, back to addresses exactly, and the app must be on.
string
Returned to you on the post_logout_redirect_uri as state.

What happens

  • With proof, the person is signed out at once. The proof is an id_token_hint issued to your app, for the person signed in to Aiveth in this browser, for this session (its sid matches). Aiveth ends the session and redirects to your post_logout_redirect_uri.
  • Without proof, Aiveth asks first. The person sees “Do you want to sign out of Aiveth? You’ll be signed out of the apps you signed in to with it, too.” and a Sign out button. A link alone never signs anyone out.
  • If nobody is signed in, Aiveth just redirects (or shows “You’re signed out of Aiveth.”).
  • If the return address isn’t registered, Aiveth stays on its own page and says “You’re signed out of Aiveth.”
Signing out here ends the Aiveth session exactly as signing out of the console does, so every app signed in through that session hears about it.

Hear when someone signs out (back-channel)

When an Aiveth session ends, Aiveth posts a logout token to your back-channel address as a form:
The logout token is a JWT signed with the same keys as ID tokens. Its claims are: It never contains a nonce. To handle it:
  1. Verify the signature, iss, aud and exp, and check that events contains the back-channel logout member.
  2. End your own session for that sid (or every session of that sub).
  3. Answer 200.

What ends, and when you hear

  • One session ends (the person signs out, or the session runs out): the sign-ins that came from that session end. Sign-ins with a refresh token (offline_access) stand, as the specification says.
  • Everything of a person ends (a password change or reset, an admin’s “sign out everywhere”, a suspension or removal): every sign-in of that person ends.
  • Your app revoking its own refresh token at /oauth/revoke also sends a notice.
Aiveth also checks every hour for sessions that ended where it couldn’t see them at once, and notifies their apps.

Retries

Aiveth tries at once, then after 5 seconds, 5 minutes and 30 minutes. A 400 answer means your app refused the notice, and Aiveth stops trying. Aiveth posts only to public https addresses and does not follow redirects.