WorkPair Registry
Developer

Receive back-channel logout tokens

Verify WorkPair’s OpenID Connect Back-Channel Logout 1.0 tokens and end the person’s session; send people to WorkPair’s end-session page.

Who it’s for
Developers of an application that uses Login with WorkPair.
What you need first
Time needed
30 minutes

Receive the logout token

  1. Discovery advertises backchannel_logout_supported: true, backchannel_logout_session_supported: true and end_session_endpoint.

  2. Keep the ID token’s sub and sid with your session when the person signs in.

  3. WorkPair POSTs to your URI with Content-Type: application/x-www-form-urlencoded and a body logout_token=<JWT>.

  4. Verify the JWT against /.well-known/jwks.json with the same algorithm as your ID tokens (header typ is logout+jwt). Check iss is WorkPair’s issuer, aud is your client_id, iat is recent and exp (two minutes later) hasn’t passed.

  5. Check events has the member http://schemas.openid.net/event/backchannel-logout, there is no nonce, and jti hasn’t been seen before (keep jti values for a few days).

  6. End every session of that sub (and sid when present), then answer 200. Anything else is retried with backoff over about two and a half days, with the same jti and a freshly signed token.

Send people to WorkPair’s sign-out page

  1. Register postLogoutRedirectUris for your client.

  2. After signing the person out of your application, send the browser to GET /oidc/logout?id_token_hint=<their ID token>&post_logout_redirect_uri=<registered URI>&state=<value> (or client_id instead of id_token_hint).

  3. WorkPair offers Sign out of WorkPair and every app and links back to your URI with your state. It never signs anyone out just because the page was opened.

What happens next

Common problems and fixes

The token has no sid.
People who signed in before back-channel logout existed have no sid until they sign in again: end every session of that sub.
/oidc/logout answers 400 invalid_request.
post_logout_redirect_uri must be registered exactly, and needs client_id or a valid id_token_hint issued by WorkPair.

Still stuck? Write to support@workpair.io and say which guide and step you were on. WorkPair will never ask for your passphrase, a code or an API key.

Receive back-channel logout tokens · How-To Guide · WorkPair