Skip to content

OpenID Connect (OIDC)

Last updated 30 Nov 2026

Accord is an OIDC provider. These are the endpoints under your environment's issuer, their parameters and the errors they return. Every address on this page starts with your issuer, https://auth.nubisco.io/e/<environment id>.

Discovery ​

GET <issuer>/.well-known/openid-configuration

Answers with the issuer and its endpoints. Point your library at the issuer and let it read this document, rather than writing the endpoints into your configuration. It may be cached for five minutes.

FieldValue
issuerhttps://auth.nubisco.io/e/<environment id>
response_types_supportedcode
grant_types_supportedauthorization_code, client_credentials
code_challenge_methods_supportedS256
scopes_supportedopenid, profile, email
prompt_values_supportednone, login
id_token_signing_alg_values_supportedRS256
token_endpoint_auth_methods_supportedclient_secret_post, client_secret_basic, none

The discovery document and the keys answer only for an environment of an approved workspace.

Keys and the key ring ​

GET <issuer>/.well-known/jwks.json

The public keys that sign your environment's tokens, as a JSON Web Key Set. Every key is RSA, used for RS256 signatures, and has a kid. Each token's header names the kid that signed it.

Each environment has its own key ring, and the set holds up to three keys:

  • the current key, which signs new tokens,
  • the next key, published ahead of time so your app already has it when signing moves to it,
  • the previous key, kept until the tokens it signed have expired.

So pick the key by kid, cache the set (it may be cached for five minutes), and fetch it again when a token names a kid you do not have. Never pin one key in your configuration. A token signed by another environment's keys never verifies against yours.

Starting a sign-in ​

GET <issuer>/authorize
ParameterRequiredWhat
response_typeyescode
client_idyesYour app's client id
redirect_uriyesOne of the app's redirect URIs, exactly as registered
stateyesAn unguessable value you check when the person comes back
scopeyesMust include openid. May add profile and email
code_challengerecommendedThe PKCE challenge: base64url of the SHA-256 of your verifier, 43 characters
code_challenge_methodwith challengeS256. No other method is accepted
noncerecommendedReturned in the ID token, so you can tie the token to this request
promptnologin to ask the person to sign in again, none to never show a page
organizationnoAn organization's id or slug. See Choosing an organization

If the person is not signed in to your environment, Accord shows the environment's sign-in page and then carries on. If they are, it returns straight away. On success the browser goes to your redirect_uri with code and state. The code is single use and expires after five minutes.

A request with no client_id, redirect_uri or state, an unknown client, or a redirect_uri that is not registered gets a 400 with a JSON error and no redirect. Every other problem goes back to your redirect_uri with error, state and sometimes error_description:

errorWhy
unsupported_response_typeresponse_type is not code
unauthorized_clientThe app may not use the authorization code grant
invalid_requestA malformed PKCE challenge, or a public client without one
invalid_scopeopenid is missing, or a scope the app may not ask for
login_requiredprompt=none and the person is not signed in
access_deniedThe person may not use this app. error_description is not_a_member or domain_not_allowed
organization_requiredThe app needs an organization and the person belongs to none that use it
organization_selection_requiredThe person belongs to several organizations that use the app and none was named
invalid_organizationThe named organization does not use this app, or the person is not a member

PKCE ​

Send a PKCE challenge on every sign-in. Make a random verifier of 43 to 128 characters from A-Z, a-z, 0-9 and -._~, send its S256 challenge to /authorize and the verifier to /token. When the code was issued with a challenge, the token endpoint refuses it without the matching verifier.

Exchanging the code ​

POST <issuer>/token
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code
&code=<code>
&redirect_uri=https://app.example.com/auth/callback
&code_verifier=<verifier>
&client_id=<client id>
&client_secret=<client secret>

The body may also be JSON. The client may authenticate with client_id and client_secret in the body, or with HTTP Basic (client_secret_basic). redirect_uri must be the one the code was issued for.

json
{
  "access_token": "eyJ...",
  "id_token": "eyJ...",
  "token_type": "Bearer",
  "expires_in": 3600,
  "scope": "openid profile email"
}

Both tokens last one hour. There is no refresh token: see Staying signed in.

Accord checks the person again at this step: that they are still active, still allowed in the app and still in the organization the code was for. A code for someone who lost access in between is refused.

StatuserrorWhy
401invalid_clientUnknown client, wrong secret, or the workspace is not issuing
400unsupported_grant_typeNot authorization_code or client_credentials
400unauthorized_clientThe app may not use this grant
400invalid_requestcode or redirect_uri is missing
400invalid_grantThe code is unknown, spent, expired, for another redirect_uri, or the verifier does not match, or the person lost access

For the client credentials grant, see Machine API and roles.

The person: userinfo ​

GET <issuer>/userinfo
Authorization: Bearer <access token>
json
{
  "sub": "<person id>",
  "email": "ada@example.com",
  "email_verified": true,
  "name": "Ada",
  "preferred_username": "ada@example.com",
  "locale": "pt-PT"
}

Only a person's access token from this environment is accepted. A machine token, an ID token or an expired token gets 401 invalid_token. name may be null for a person who has not given one. locale is the person's language as saved now, for an access token with the profile scope, and is left out when the person follows their browser's language (see the person's language).

Choosing an organization ​

For an app whose people come from organizations, a person who belongs to several organizations that use the app must pick one. The first sign-in comes back with organization_selection_required. Show your own picker, then start the sign-in again with organization=<id or slug>. A person in exactly one organization that uses the app gets it without asking. See Organizations for the claims that result.

Staying signed in ​

A sign-in at your environment lasts seven days in that browser. Access and ID tokens last one hour, and there are no refresh tokens yet. To renew, send the browser to /authorize again with prompt=none: while the sign-in lasts it comes straight back with a new code, and after that it comes back with login_required, and you start a normal sign-in.

Signing out ​

GET <issuer>/end-session?client_id=<client id>

Ends the person's sign-in at your environment in this browser and shows the environment's sign-in page. Sign the person out of your own app first.

Not built yet ​

  • Refresh tokens. Use prompt=none as above.
  • The device authorization grant (signing in on a TV or console with a code typed on a phone) is not available in customer environments.
  • Returning to your app after sign-out. There is no way to register a return address yet, so the browser always lands on the sign-in page.
  • Social sign-in other than Google. People sign in with an emailed code or Google (then a second step when they have one), or with a passkey. See Signing in.

Accord is proprietary software by Nubisco.