This flow lives on the platform, at
api.noorle.com, and the human-facing approval page is on the Portal. It is not served by the identity boundary at auth.noorle.com — the boundary advertises only the authorization-code grant. The two issue different tokens signed with different key material.The shape
Step 1 — request a device code
The user-code alphabet excludes visually ambiguous characters, so a code read aloud or off a screen is unambiguous.
Step 2 — the human approves
Send them toverification_uri_complete if you can; otherwise print the plain URL and the code separately, because a code that has to be retyped is a code that gets typo’d.
verification_uri the response gave you rather than a URL you hard-coded. The Portal host it points at is environment-specific, and the response is the authority on it.
Step 3 — poll for the token
authorization_pending. Other outcomes: slow_down if you are polling too fast, access_denied if the human declined, and an expired-token error past fifteen minutes.
On success:
What you get back
Access token. A JWT signed HS256, valid one hour. Send it asAuthorization: Bearer ….
Scope. account:manage:{account_id} — the scope identifies which account the token is good for. There is no read/write/admin scope split; authority comes from the approving user’s role and grants.
Plan for the hour. When an access token expires, run the device flow again — the human approves once more and you get a fresh token.
Using the token
Storing it
The token is a bearer credential for one hour. Treat it accordingly:- A file with owner-only permissions, or the OS keychain.
- Never a world-readable location, never a shell history, never a log line.
- In a container, pass it as an environment variable rather than baking it into an image.
Security notes
The device code is the secret. Anyone holding it can poll for the token. It never goes on screen, never in a URL you display, never in a log. The user code is not a secret, but a wrong code is a code entered against someone else’s pending request. Fifteen minutes of validity bounds the exposure. Both codes are single-use. A successful exchange deletes the session.Device flow or API key?
Use the device flow when a person is present and their identity should be on the record — the token carries their principal, so the audit trail names them. Use an API key when nobody is present. The device flow needs a human at a browser by construction, which an unattended job does not have.Troubleshooting
Next: JWT Tokens — what is actually inside these tokens, and which issuer signed them.