Start a device authorization
The device authorization endpoint (RFC 8628 §3.1). Use it from a device that cannot open a browser, such as a terminal. Show user_code and verification_uri to the user. Then poll the token endpoint with the device_code grant at the interval (RFC 8628 §3.4). The client must be a first-party application registered for the device code grant. It sends only its client_id.
application/x-www-form-urlencoded- body
The device authorization request (RFC 8628 §3.1).
client_id*stringThe client ID of a first-party application.
scope?stringAccepted and not used.
The device authorization (RFC 8628 §3.2).
application/json- response
The device authorization response (RFC 8628 §3.2).
device_code*stringThe code to send to the token endpoint. Only this client can redeem it.
user_code*stringThe code that the user enters on the verification page.
verification_uri*stringuriverification_uri_complete?stringThe verification page with the user code filled in. Omitted when not available.
uriexpires_in*integerThe lifetime of the codes in seconds.
uint64interval?integerThe minimum number of seconds between polls. Omitted when not set.
uint64curl -X POST 'https://auth.spiraldb.com/oauth/device_authorization' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'client_id=string'{ "device_code": "string", "user_code": "string", "verification_uri": "http://example.com", "verification_uri_complete": "http://example.com", "expires_in": 0, "interval": 0}