Add device authorization to app-server gateway OAuth (#60486)

## What changed

- Advertise `supportsDeviceAuth` in `account/gatewayOAuth/read` and accept `deviceAuth: true` in `account/gatewayOAuth/login`.
- Return a device prompt with `verificationUrl`, `userCode`, and `loginId` before approval, then notify the initiating connection of success or failure with the matching `loginId`.
- Reuse or refresh saved credentials when possible, returning `prompt: null` without another device authorization. Update protocol schemas, generated bindings, and documentation.

## Testing

Add an integration test covering the device prompt, correlated completion notification, capability reporting, and token refresh without another device grant.

GitOrigin-RevId: 6ecc38c9baadcfda3272654ed71e4aaa431421bf
This commit is contained in:
smurching-oai
2026-11-10 01:28:45 +00:00
committed by copyberry
parent 1885417cd4
commit d8c42ecf8f
23 changed files with 414 additions and 26 deletions
@@ -1681,6 +1681,10 @@
"GatewayOAuthLoginParams": {
"description": "Authorize a configured provider without changing the default or any thread's provider.",
"properties": {
"deviceAuth": {
"description": "Select device authorization when the server advertises support for it.",
"type": "boolean"
},
"modelProvider": {
"description": "Defaults to the current provider when omitted.",
"type": [