Skip to content

@camera.ui/sdk / plugin / OAuthState

Interface: OAuthState

Defined in: plugin/oauth.ts:11

Snapshot of a provider connection's lifecycle. Lives in the plugin and is the source of truth for both the host UI and downstream plugin code that needs a token. The host polls it via getOAuthState while a flow runs.

Properties

authUrl?

optional authUrl?: string

Defined in: plugin/oauth.ts:21

Authorization-code-flow URL the browser must open (set while awaiting_user).


connectedAt?

optional connectedAt?: number

Defined in: plugin/oauth.ts:25

Unix timestamp the grant was established (set while connected).


errorCode?

optional errorCode?: string

Defined in: plugin/oauth.ts:29

OAuth error code (set while error): access_denied | expired_token | server_error.


errorMessage?

optional errorMessage?: string

Defined in: plugin/oauth.ts:31

Human-readable error detail (set while error).


scopesGranted?

optional scopesGranted?: string[]

Defined in: plugin/oauth.ts:27

Scopes granted by the IdP (set while connected).


status

status: OAuthStatus

Defined in: plugin/oauth.ts:13

Current lifecycle phase.


userCode?

optional userCode?: string

Defined in: plugin/oauth.ts:15

Device-flow user code shown to the user (set while awaiting_user).


userEmail?

optional userEmail?: string

Defined in: plugin/oauth.ts:23

Connected account email (set while connected).


verificationUri?

optional verificationUri?: string

Defined in: plugin/oauth.ts:17

Device-flow verification URI the user opens (set while awaiting_user).


verificationUriComplete?

optional verificationUriComplete?: string

Defined in: plugin/oauth.ts:19

Verification URI with the user code embedded — rendered as a QR code.