Skip to main content

OAuth Parameters Reference

Authorization endpoint

GET https://auth.loginwithdomain.com/oauth/authorize
ParameterRequiredDescription
client_idyesYour registered client ID
redirect_uriyesMust exactly match a registered URI
response_typeyesAlways code
scopeyesSpace-separated scope list (e.g. openid)
staterecommendedOpaque CSRF-prevention value
code_challengerecommendedBase64URL SHA-256 of code verifier (PKCE)
code_challenge_methodif PKCEAlways S256

Token endpoint

POST https://auth.loginwithdomain.com/oauth/token
Content-Type: application/x-www-form-urlencoded

Authorization Code grant

ParameterRequiredDescription
grant_typeyesauthorization_code
codeyesAuthorization code from callback
redirect_uriyesMust match the authorization request
client_idyes*Via body or Basic auth
client_secretyes*Via body or Basic auth
code_verifierif PKCEOriginal PKCE verifier string

*Client credentials can be sent as Authorization: Basic BASE64(client_id:client_secret) instead of body params.

Refresh Token grant

ParameterRequiredDescription
grant_typeyesrefresh_token
refresh_tokenyesThe refresh token
client_idyesYour client ID

Token response

FieldDescription
access_tokenBearer token. Valid for 3600 seconds.
token_typeAlways bearer
expires_in3600
refresh_tokenToken for refresh grant
scopeGranted scopes
validation_data(Optional) Cryptographic domain proof

validation_data fields

FieldDescription
fqdn{identifier}#{deviceId}
public_keyHex-encoded Ed25519 public key
hash_algosha256
signed_payloadThe challenge that was signed (hex)
signatureHex-encoded Ed25519 signature

UserInfo endpoint

GET https://auth.loginwithdomain.com/oauth/userinfo
Authorization: Bearer ACCESS_TOKEN
FieldDescription
subThe user's domain identifier

Error codes

CodeHTTP statusDescription
invalid_request400Missing or malformed parameters
invalid_client400Unknown client_id or wrong client_secret
invalid_grant400Unknown, expired, or mismatched code; PKCE failure
access_deniedUser denied consent (returned as redirect parameter)
unsupported_grant_type400Grant type not supported

Scopes

ScopeDescription
openidRequired. Enables sub claim in userinfo.
profileReserved.

Discovery

GET https://auth.loginwithdomain.com/.well-known/openid-configuration