OpenID Connect · OAuth 2.1

Sign in with Orneos

Sign your users in with their Orneos account (Authorization Code + mandatory PKCE S256).

1. Discovery and endpoints

#

The Orneos OpenID Connect configuration is published at https://orneos.eu/.well-known/openid-configuration. All tokens are signed with RS256; their issuer (iss) is https://orneos.eu.

Pages the user sees (sign-in, consent, sign-out) live on https://login.orneos.eu. Server-to-server calls (tokens, profile, revocation, keys) go to https://orneos.eu.

Client authentication at /oauth/token: client_secret_basic (recommended), client_secret_post, or none for public clients.

Read the configuration
curl -s https://orneos.eu/.well-known/openid-configuration | jq .

2. Authorization and PKCE (RFC 7636)

#

Every application, confidential or public, must use PKCE with the S256 method. A request without code_challenge, or using plain, comes back with the invalid_request error.

Generate a random string of 43 to 128 characters (code_verifier), compute its SHA-256 hash encoded as base64url without trailing = (code_challenge), then redirect the user.

  • response_type=code: required
  • code_challenge and code_challenge_method=S256: required
  • scope: openid required, profile and email optional. Any other scope is refused (invalid_scope).
  • state: random value to check on return (CSRF protection), strongly recommended
  • nonce (recommended): copied as is into the ID Token, to bind it to your session
  • prompt (optional): none (silent sign-in, otherwise login_required or consent_required), login (asks for the password again), consent (shows the consent screen again)
Full authorization URL
https://login.orneos.eu/oauth/authorize
  ?client_id=orn_0123456789abcdef01234567
  &redirect_uri=https%3A%2F%2Fexample.com%2Foauth%2Fcallback
  &response_type=code
  &scope=openid%20profile%20email
  &state=sec_state_9f8e7d6c5b
  &nonce=n_4c1a77e0b2
  &code_challenge=E9Melhoa2OwvFrGMTJguCHaoeK1t8URWbuGJSstw-cM
  &code_challenge_method=S256

3. Code exchange and refresh token rotation

#

Once the user agrees, Orneos returns to your redirect_uri with ?code=…&state=…. The code is single-use and valid for 60 seconds: exchange it right away.

Send a POST to https://orneos.eu/oauth/token with the same redirect_uri and your code_verifier. A confidential client authenticates with HTTP Basic (client_id:client_secret); a public client only sends client_id in the body.

Orneos returns an access_token (1 hour), an id_token (RS256 JWT, 1 hour) and a refresh_token (30 days).

Rotation: each use of a refresh_token returns a new one and invalidates the old one. If an already-used token is presented again (a sign of theft), the whole token chain of that sign-in is revoked.

Validate the ID Token: Check the signature with the keys at https://orneos.eu/oauth/jwks (kid field), then check iss = https://orneos.eu, aud = your client_id, exp and your nonce. OpenID Connect libraries do this for you.
Code exchange (confidential client)
curl -X POST https://orneos.eu/oauth/token \
  -u "orn_0123456789abcdef01234567:orns_CLIENT_SECRET" \
  -d "grant_type=authorization_code" \
  -d "code=RECEIVED_CODE" \
  -d "redirect_uri=https://example.com/oauth/callback" \
  -d "code_verifier=YOUR_CODE_VERIFIER"
Response
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6ImF0K2p3dCJ9…",
  "token_type": "Bearer",
  "expires_in": 3600,
  "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9…",
  "scope": "openid profile email",
  "refresh_token": "ornr_…"
}
Refresh with refresh_token
curl -X POST https://orneos.eu/oauth/token \
  -u "orn_0123456789abcdef01234567:orns_CLIENT_SECRET" \
  -d "grant_type=refresh_token" \
  -d "refresh_token=ornr_YOUR_REFRESH_TOKEN"

4. Reading the profile at /oauth/userinfo

#

Send the access_token in the Authorization: Bearer <token> header. The response only contains the information of the granted scopes.

sub is the user’s Orneos username: it never changes, use it as the account key on your side. The email address may change.

picture (profile scope) is the public address of the profile photo, 512 × 512 px. It is only present if the user picked a photo, and changes when they replace it: read the profile again at each sign-in rather than keeping it forever.

Request
curl -H "Authorization: Bearer ACCESS_TOKEN" https://orneos.eu/oauth/userinfo
Response (scopes openid profile email)
{
  "sub": "alice",
  "preferred_username": "alice",
  "name": "Alice Durand",
  "locale": "en",
  "picture": "https://app.orneos.eu/avatar/alice/512?v=3",
  "email": "alice@orneos.eu",
  "email_verified": true
}

5. Revocation and sign-out

#

Revoking a token (RFC 7009): POST https://orneos.eu/oauth/revoke with token=…, authenticating as at /oauth/token. Revoking a refresh token revokes its whole chain. The response is always 200 {}, even for an unknown token.

Signing the user out of Orneos: redirect them to https://login.orneos.eu/oauth/logout with client_id (or id_token_hint), post_logout_redirect_uri (an address registered in the console) and, if needed, state.

Back-channel logout (OpenID Connect Back-Channel Logout 1.0): if you register a back-channel address in the console, Orneos sends it a POST with logout_token (RS256 JWT, typ logout+jwt, sub and sid claims) when the user signs out of Orneos. Check the signature, close the matching session and answer 200 within 5 seconds.

Revoke a token
curl -X POST https://orneos.eu/oauth/revoke \
  -u "orn_0123456789abcdef01234567:orns_CLIENT_SECRET" \
  -d "token=ornr_YOUR_REFRESH_TOKEN"
Sign-out
https://login.orneos.eu/oauth/logout
  ?client_id=orn_0123456789abcdef01234567
  &post_logout_redirect_uri=https%3A%2F%2Fexample.com%2Fgoodbye
  &state=xyz

6. Official “Sign in with Orneos” buttons

#

Use our official branded button. It comes in two themes: light (white background) and dark (navy background). Pick the one that stands out best on your page. Styles are inlined, so it renders as is without any extra stylesheet.

Light button (HTML & SVG)
<a href="YOUR_AUTH_URL" class="orneos-signin-btn"
   style="display:inline-flex;align-items:center;gap:10px;height:42px;padding:0 16px;border-radius:6px;background:#ffffff;color:#0f2440;border:1px solid #d3d9e3;font:600 14px/1 system-ui,sans-serif;text-decoration:none;box-shadow:0 1px 3px rgba(0,0,0,.06)">
  <svg aria-hidden="true" viewBox="0 0 36 36" width="18" height="18">
    <path d="M21.4 3.2C11.2 2 2.8 9.8 2.8 19.4c0 2.4.6 4.6 1.6 6.6L11 19.4c-.8-5 2.8-9.6 7.8-10l2.6-6.2z" fill="#002FA7"/>
    <path d="M32.8 16.2c.8 9.4-6.6 17-16 17-4 0-7.7-1.5-10.4-4.2l6.6-6.6c3.8 3.4 9.8 2.6 12.6-2.2l7.2-4z" fill="#2B5CE6"/>
    <path d="M24.4 4.2c4.4 2 7.4 5.8 8.2 9.4l-6.8 3.8c-.8-3.4-3-6-6-7.2l4.6-6z" fill="#F0A202"/>
  </svg>
  <span>Sign in with Orneos</span>
</a>
Dark button (HTML & SVG)
<a href="YOUR_AUTH_URL" class="orneos-signin-btn dark"
   style="display:inline-flex;align-items:center;gap:10px;height:42px;padding:0 16px;border-radius:6px;background:#0f2440;color:#ffffff;border:1px solid #22385b;font:600 14px/1 system-ui,sans-serif;text-decoration:none">
  <svg aria-hidden="true" viewBox="0 0 36 36" width="18" height="18">
    <path d="M21.4 3.2C11.2 2 2.8 9.8 2.8 19.4c0 2.4.6 4.6 1.6 6.6L11 19.4c-.8-5 2.8-9.6 7.8-10l2.6-6.2z" fill="#FFFFFF"/>
    <path d="M32.8 16.2c.8 9.4-6.6 17-16 17-4 0-7.7-1.5-10.4-4.2l6.6-6.6c3.8 3.4 9.8 2.6 12.6-2.2l7.2-4z" fill="#FFFFFF" fill-opacity=".76"/>
    <path d="M24.4 4.2c4.4 2 7.4 5.8 8.2 9.4l-6.8 3.8c-.8-3.4-3-6-6-7.2l4.6-6z" fill="#F0A202"/>
  </svg>
  <span>Sign in with Orneos</span>
</a>