Sign in with Comulative. Any service can let people use their Comulative account. It’s standard OpenID Connect, so the library you already use for Google works here too.

Comulative is an OpenID Connect provider. It supports the authorization code flow with PKCE (required for every client), refresh tokens, token revocation and introspection, and RP-initiated logout. The discovery document has everything a library needs:

https://comulative.com/.well-known/openid-configuration

Register your service

Clients are registered by the Comulative team. Send [email protected] your service’s name, its exact redirect URIs (HTTPS, no wildcards), any post-logout redirect URIs, the scopes it needs, the URLs of its privacy policy and terms, and, optionally, a webhook URL for account events. You’ll get a client ID and, for a server-side app, a client secret. Single-page and native apps are public clients with no secret.

The flow

1. Send the person to the authorization endpoint with a PKCE challenge:

GET https://comulative.com/oauth/authorize
  ?response_type=code
  &client_id=jokelboard
  &redirect_uri=https://jokelboard.com/auth/comulative/callback
  &scope=openid profile email roblox
  &state=<random>
  &nonce=<random>
  &code_challenge=<BASE64URL(SHA256(verifier))>
  &code_challenge_method=S256

They sign in if they need to and approve what you asked for. First-party services can be registered to skip the approval screen; the person still sees the connection on their account page and can remove it. Add prompt=none to check for a session silently, prompt=login or max_age to require a recent sign-in, and prompt=consent to ask again.

2. We redirect back with code, your state, and iss=https://comulative.com. Check both.

3. Exchange the code within five minutes. Codes work once.

POST https://comulative.com/oauth/token
Authorization: Basic base64(client_id:client_secret)
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code=cmac_…&redirect_uri=…&code_verifier=…

The response has an access_token (one hour), an id_token (RS256, verify it against https://comulative.com/.well-known/jwks.json and check iss, aud, exp and nonce), and a refresh_token if you asked for offline_access. Refresh tokens rotate: each one works once, and presenting a used one revokes the whole chain.

Scopes and claims

Claims come in the ID token and from https://comulative.com/oauth/userinfo. For a plain JSON view of the account, call GET https://comulative.com/api/v1/me with the access token as a Bearer token.

Disconnections and deleted accounts

When someone disconnects your service or deletes their Comulative account, its tokens stop working at once. If you registered a webhook, we also POST a Security Event Token (RFC 8417, delivered as in RFC 8935): a JWT signed with the same keys, Content-Type: application/secevent+jwt, with aud set to your client ID and one of these events about the account in sub:

  • https://comulative.com/events/account-deleted: erase what you hold for this person, unless you have a legal reason to keep it.
  • https://comulative.com/events/grant-revoked: sign them out and stop using what you received.

Answer with any 2xx status. We retry with backoff for about four and a half days. Under the GDPR you must act on deletions: the person asked us to erase their data, and we tell you so that you can do the same.

Signing out

To end the person’s Comulative session too, send them to https://comulative.com/oauth/logout with id_token_hint, a registered post_logout_redirect_uri and state. With a valid hint we sign them out straight away; without one we ask them first.

Other endpoints

  • POST /oauth/revoke: revoke an access or refresh token (RFC 7009).
  • POST /oauth/introspect: check a token your service was issued (RFC 7662, confidential clients).

Questions, or want to register a client? [email protected]. People using your service can read about their data in our Privacy Policy.