loginos

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.

Issuerhttps://loginos.io
Discoveryhttps://loginos.io/.well-known/openid-configuration
Keys (JWKS)https://loginos.io/.well-known/jwks.json
Client authenticationclient_secret_basic or client_secret_post: app key and app secret
FlowsAuthorization code, with PKCE (S256); pushed authorization requests
ID tokensRS256, one hour, aud is your app key

Endpoints

GET/oauth/authorize

Starts a sign-in. Send the browser here.

Parameter
client_idYour app key. Required.
redirect_urihttps://<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_typecode. Required.
scopeAny of openid profile email, space-separated. Default: all three.
stateReturned untouched with the code. Up to 500 characters. Use it.
nonceCopied into the ID token. Up to 500 characters.
code_challenge, code_challenge_methodPKCE: the base64url SHA-256 of your verifier, and S256.
promptnone, login, select_account or consent. See below.
ui_localesThe language of the loginos pages: en, de, es, fr, id, it, nl, pl, pt, ru, tr, uk, hi, ja, ko or zh.
request_uriInstead of all of the above (except client_id): the request_uri from /oauth/par.
prompt
noneNever shows a page: a code if the person is signed in and has approved you, otherwise login_required or consent_required.
loginAsks the person to sign in again, even with a session. Check auth_time in the ID token.
select_accountShows the account chooser.
consentShows 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_idLink the account: your id for the signed-in user (1 to 128 visible characters). Needs PKCE.
external_labelHow the person recognizes that account, shown on the link screen (up to 120 characters).
Response (201)
{
  "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_typeauthorization_code.
codeThe code from the callback, or from the SDK. Valid five minutes, once. Using it twice revokes the tokens it gave.
redirect_uriThe same as in the authorization request. Leave it out for SDK codes.
code_verifierRequired when the request had a code_challenge.
Response
{
  "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

ClaimScope
subalwaysThe person’s loginos id. Never changes, and is the same on all of your domains.
external_idalways, once linkedYour own id for the person. See Link existing accounts.
rolesalwaysRole keys on your platform.
permissionsalwaysPermission keys those roles grant.
preferred_usernameprofileTheir loginos username. It never changes.
nameprofileDisplay name.
pictureprofileTheir avatar (an initial on yellow when they have no photo).
profileprofileTheir public card, like https://loginos.io/@jane, when it is public.
localeprofileThe interface language they chose.
updated_atprofileWhen their profile last changed (Unix time).
emailemailTheir email address.
email_verifiedemailfalse: 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

errorWhereMeaning
access_deniedcallbackThe person cancelled, or can’t continue (blocked, or sign-ups are closed).
login_requiredcallbackprompt=none, and nobody is signed in to loginos.
consent_requiredcallbackprompt=none, but the person has to approve something first (or a link).
invalid_requestcallback, PARA malformed parameter, like a bad code_challenge.
unsupported_response_typecallback, PARresponse_type isn’t code.
invalid_clienttoken, PAR, revokeWrong app key or secret (401).
invalid_granttokenThe code is unknown, used, expired, for another redirect_uri, or failed PKCE; or the person lost access in between.
unsupported_grant_typetokenOnly authorization_code.
slow_downtoken, PARToo 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.