Whether this browser is signed in, and whether a passkey exists yet
GET
/api/v1/auth/state
const url = 'https://deck.example.com/api/v1/auth/state';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://deck.example.com/api/v1/auth/stateAuthorizations
Section titled “Authorizations”- None
Responses
Section titled “Responses”GET /api/auth/state: what the sign-in screen shows.
Media typeapplication/json
GET /api/auth/state: what the sign-in screen shows.
object
setup_needed
required
No passkey is registered yet: the first one needs a setup code from the deck’s container.
boolean
signed_in
required
boolean
signin
The deck signs its owner in through Fleetlayer’s sign-in service too: the web app offers it, at
/auth/signin?next=<path>.
boolean
Example
{ "signin": false}default
Section titled “default”An error, with its message.
Media typeapplication/json
Every error the REST API returns, with an HTTP status.
object
error
required
string
Example generated
{ "error": "example"}