FruxonDocs
ApiDevice authorization

Finish a device-authorization grant — the approval page has approved every workspace the user picked, so the client may now collect them.

Global, not tenant-scoped, and that is the point. Approving is per workspace and each call is routed to that workspace's own cell, because only a cell can mint a key for a workspace it holds. Finishing is about the sign-in as a whole, so it belongs on the plane: one cell being unreachable then costs the workspaces in that cell, not the login. Requires the Firebase JWT of the user who approved the grant — a key cannot reach it (`[RequireFederation]`), and a different signed-in user gets the same not-found a bad code gets. Until this is called the grant stays pending and the client keeps polling, which is what lets several cells answer before the client collects anything.

POST
/v1/deviceAuthorizations/{userCode}:finish
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

userCode*string

The short user code from the URL the client opened.

Response Body

curl -X POST "https://api.fruxon.com/v1/deviceAuthorizations/string:finish"
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}