/device page. The device then gets tokens, the same as any other app.
Aiveth implements the OAuth 2.0 Device Authorization Grant (RFC 8628).
Device login needs the Pro plan or above.
Turn it on for an app
Device login is off for every app until an admin turns it on. Device codes are a known phishing path (an attacker sends someone their own code), so turn it on only for apps that need it.1
Open the app
In the console, open Apps and select the app.
2
Turn on device login
Under Device login, select Turn on.
The flow
1
The device asks for codes
client_secret in the form). scope must include openid; if you leave it out, Aiveth uses openid.2
The device shows the code
Show the
user_code and the verification_uri, or a QR code of verification_uri_complete. Keep the device_code secret.3
The person allows it
The person opens
/device, signs in if needed, and enters the code. Aiveth shows a confirmation that names the app and the organization and asks whether they started this on their own device. They choose to allow it or not.4
The device polls for tokens
Every Once the person allows it, the answer has the access token, ID token and, with
interval seconds, the device asks the token endpoint:offline_access, a refresh token. See Tokens and claims.Polling answers
While it waits, the token endpoint answers400 with one of these error values:
The answer is given once. After the device receives its tokens, or a refusal, the device code no longer works.
Codes and limits
- User code: 8 letters from 20 consonants (no vowels, no digits), shown as
XXXX-XXXX. Case and dashes are ignored when typed. - Device code: 256 random bits. Aiveth keeps only its hash, and it works once.
- Lifetime: 5 minutes. Polling interval: 5 seconds to start.
- Typing codes: a person can try only a few codes in a short time, from one person and one network.
- Starting requests: at most 30 a minute from one network address, and 300 a minute for one app. Past that,
/oauth/device_authorizationanswers429withslow_down. - Organization: a person can allow only codes of their own organization’s apps.