Reference
OpenID Connect reference
Every endpoint, parameter, scope, claim and error of the loginos OpenID Connect provider.
loginos is an OpenID Connect provider. This page lists every endpoint, parameter, claim and error. For a walkthrough, start with the Quickstart.
| Issuer | https://loginos.io |
| Discovery | https://loginos.io/.well-known/openid-configuration |
| Keys (JWKS) | https://loginos.io/.well-known/jwks.json |
| Client authentication | client_secret_basic or client_secret_post: app key and app secret |
| Flows | Authorization code, with PKCE (S256); pushed authorization requests |
| ID tokens | RS256, one hour, aud is your app key |
Endpoints
GET/oauth/authorize
Starts a sign-in. Send the browser here.
| Parameter | |
|---|---|
client_id | Your app key. Required. |
redirect_uri | https://<one of your domains><callback path>, exactly: a registered host, a subdomain under a verified wildcard, or a host your server confirms (automatic domains). No query string or fragment; http only on localhost and 127.0.0.1. Required. |
response_type | code. Required. |
scope | Any of openid profile email, space-separated. Default: all three. |
state | Returned untouched with the code. Up to 500 characters. Use it. |
nonce | Copied into the ID token. Up to 500 characters. |
code_challenge, code_challenge_method | PKCE: the base64url SHA-256 of your verifier, and S256. |
prompt | none, login, select_account or consent. See below. |
ui_locales | The language of the loginos pages: en, de, es, fr, id, it, nl, pl, pt, ru, tr, uk, hi, ja, ko or zh. |
request_uri | Instead of all of the above (except client_id): the request_uri from /oauth/par. |
prompt | |
|---|---|
none | Never shows a page: a code if the person is signed in and has approved you, otherwise login_required or consent_required. |
login | Asks the person to sign in again, even with a session. Check auth_time in the ID token. |
select_account | Shows the account chooser. |
consent | Shows the consent screen even if they approved you before. |
On success, the browser comes back to redirect_uri?code=…&state=…. Errors come back as ?error=…&error_description=…&state=…, except two: an unknown client_id or an unregistered redirect_uri is explained on a loginos page and never redirected.
POST/oauth/par
A pushed authorization request: your server sends the parameters of /oauth/authorize first, with client authentication, and gets a request_uri for the browser. Nothing in the browser’s address can change them. It is how account linking works.
| Extra parameter | |
|---|---|
external_id | Link the account: your id for the signed-in user (1 to 128 visible characters). Needs PKCE. |
external_label | How the person recognizes that account, shown on the link screen (up to 120 characters). |
{
"request_uri": "urn:ietf:params:oauth:request_uri:Q3mF…",
"expires_in": 1800,
"authorize_url": "https://loginos.io/oauth/authorize?client_id=…&request_uri=…"
}authorize_url is ready to redirect to. A request yields one code; after 30 minutes, or once used, loginos shows “This link has expired”.
POST/oauth/token
Exchanges a code. Form-encoded or JSON body, with client authentication.
| Parameter | |
|---|---|
grant_type | authorization_code. |
code | The code from the callback, or from the SDK. Valid five minutes, once. Using it twice revokes the tokens it gave. |
redirect_uri | The same as in the authorization request. Leave it out for SDK codes. |
code_verifier | Required when the request had a code_challenge. |
{
"access_token": "lat_…",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "openid profile email",
"id_token": "eyJhbGciOiJSUzI1NiIs…",
"user": { "sub": "9b1f6c2e-…", "preferred_username": "jane", "roles": ["member"], "permissions": ["posts:read"] }
}id_token is there when you asked for openid. user holds the same claims as the ID token, so you don’t have to decode it. A code from a link request makes the link here, before the tokens are issued.
GET/oauth/userinfo
The current claims for an access token: Authorization: Bearer lat_…. Also accepts POST, and answers browsers from any origin (CORS).
POST/oauth/revoke
Revokes an access token (RFC 7009): token=lat_…, with client authentication. Always 200 for an authenticated client.
GET/oauth/logout
Ends the person’s loginos session. With client_id and a post_logout_redirect_uri on one of your domains, the browser goes there afterwards (with your state, if you sent one); otherwise to the loginos sign-in page.
Claims
| Claim | Scope | |
|---|---|---|
sub | always | The person’s loginos id. Never changes, and is the same on all of your domains. |
external_id | always, once linked | Your own id for the person. See Link existing accounts. |
roles | always | Role keys on your platform. |
permissions | always | Permission keys those roles grant. |
preferred_username | profile | Their loginos username. It never changes. |
name | profile | Display name. |
picture | profile | Their avatar (an initial on yellow when they have no photo). |
profile | profile | Their public card, like https://loginos.io/@jane, when it is public. |
locale | profile | The interface language they chose. |
updated_at | profile | When their profile last changed (Unix time). |
email | email | Their email address. |
email_verified | email | false: loginos doesn’t verify email addresses yet. |
ID tokens also carry iss, aud (your app key), azp, iat, exp, auth_time, amr (["hwk"] after a passkey, ["pwd"] after a password) and your nonce.
Verifying ID tokens
If you take tokens from the token endpoint over TLS, as in the examples, you may use the user object directly. If an ID token reaches you any other way, verify it: RS256 signature against the JWKS (keys rotate; match the kid), iss equals https://loginos.io, aud equals your app key, exp is in the future, and nonce is yours. Any JOSE library does this, for example jose in JavaScript.
Errors
error | Where | Meaning |
|---|---|---|
access_denied | callback | The person cancelled, or can’t continue (blocked, or sign-ups are closed). |
login_required | callback | prompt=none, and nobody is signed in to loginos. |
consent_required | callback | prompt=none, but the person has to approve something first (or a link). |
invalid_request | callback, PAR | A malformed parameter, like a bad code_challenge. |
unsupported_response_type | callback, PAR | response_type isn’t code. |
invalid_client | token, PAR, revoke | Wrong app key or secret (401). |
invalid_grant | token | The code is unknown, used, expired, for another redirect_uri, or failed PKCE; or the person lost access in between. |
unsupported_grant_type | token | Only authorization_code. |
slow_down | token, PAR | Too many requests (429). Wait for Retry-After. |
“Continue as” (FedCM)
The SDK uses the browser’s FedCM API through https://loginos.io/fedcm/config.json. Codes it returns are exchanged at /oauth/token like any other, without redirect_uri. Your pages must be on one of your platform’s domains.