OAuth: consent and patient polling
OAuth: consent and patient polling
OAuth 2.0 Device Authorization Flow
The device gets two codes from the authorization server, the service that issues tokens. It keeps the device code and uses it to poll for a token. The user enters the short user code in a browser, signs in, and approves the requested access. The server links that approval to the waiting device; polling cannot replace consent.
OAuth: consent and patient polling
Play silently with captions on provisional timing; narration audio is pending. States and timing are teaching illustrations, not measured protocol time. Choose Reduced motion for a complete still at each supported beat. Beats marked CANNOT SHOW remain caption-only.
Full transcript — OAuth: consent and patient polling (8 beats)
B1 — Factory sensor
You are a technician connecting a factory sensor so it can send measurements. The sensor has a small display, and you can read its setup code from a service panel. Your task is to authorize access without giving the sensor your password.
Model caption: A technician authorizes a factory sensor to send measurements; the sensor does not receive the user's password.
B2 — Two codes
The device authorization flow moves your approval to a separate browser. The sensor asks an authorization server for codes. A device code stays with the sensor to identify its token request. A short user code links your browser approval to that request. Each code has a different job.
Model caption: The device code identifies the sensor's token request; the user code links browser approval to that request.
B3 — Browser interaction limitation
You enter the user code at the trusted verification address, sign in, and review the requested permissions before approving. In the factory sensor example, those permissions allow sending measurements and reading configuration. The password stays in the browser interaction while the sensor waits for the outcome.
Model caption: In a separate browser, enter the user code, sign in, and approve measurement writing and configuration reading. The sensor waits without receiving the password. CANNOT SHOW: this beat is caption-only; no asset controls change.
B4 — Pending polling
The sensor checks for the outcome by polling: asking the server's token endpoint whether authorization is ready. In the model's factory sensor setting, the required gap between requests is seven seconds. While approval is incomplete, the response means authorization is pending. The device code identifies the request being checked.
Model caption: The sensor uses its device code to ask for the token outcome. The required request gap is seven seconds; incomplete approval returns authorization pending.
B5 — Elapsed expiry limitation
The same example gives the code a lifetime of nine hundred seconds. If the user has not completed verification before it expires, the sensor must stop using that device code. No token is issued for the expired code; starting again requires new codes.
Model caption: The example code lasts nine hundred seconds. Without completed verification before expiry, no token is issued; discard the device code and request new codes. CANNOT SHOW: this beat is caption-only; no asset controls change.
B6 — Slow down
The misconception is that polling faster can replace user approval. Asking again cannot supply consent. In the model, asking too soon produces a slow down response. Start with the sensor's seven second interval, add five seconds, and the required wait becomes twelve seconds or more.
Model caption: Faster polling cannot supply user consent. Seven seconds plus five seconds makes the updated wait twelve seconds or more.
B7 — Elapsed waiting limitation
After waiting for the updated interval and user approval, the model returns an access token with the requested permissions. The sensor can then send measurements using that token as its credential. The token now carries the access you approved for the sensor.
Model caption: After the updated wait and user approval, the scoped token allows measurement submission. The token carries the access approved for the sensor. CANNOT SHOW: this beat is caption-only; no asset controls change.
B8 — Consent and polling
The browser supplies consent; patient polling lets the sensor obtain the token that carries the permitted access.
Model caption: The browser supplies consent; patient polling lets the sensor obtain the token that carries the permitted access.