@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?
optionalauthUrl?:string
Defined in: plugin/oauth.ts:21
Authorization-code-flow URL the browser must open (set while awaiting_user).
connectedAt?
optionalconnectedAt?:number
Defined in: plugin/oauth.ts:25
Unix timestamp the grant was established (set while connected).
errorCode?
optionalerrorCode?:string
Defined in: plugin/oauth.ts:29
OAuth error code (set while error): access_denied | expired_token | server_error.
errorMessage?
optionalerrorMessage?:string
Defined in: plugin/oauth.ts:31
Human-readable error detail (set while error).
scopesGranted?
optionalscopesGranted?: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?
optionaluserCode?:string
Defined in: plugin/oauth.ts:15
Device-flow user code shown to the user (set while awaiting_user).
userEmail?
optionaluserEmail?:string
Defined in: plugin/oauth.ts:23
Connected account email (set while connected).
verificationUri?
optionalverificationUri?:string
Defined in: plugin/oauth.ts:17
Device-flow verification URI the user opens (set while awaiting_user).
verificationUriComplete?
optionalverificationUriComplete?:string
Defined in: plugin/oauth.ts:19
Verification URI with the user code embedded — rendered as a QR code.