Skip to main content

Type Alias: OAuthConsentProps

OAuthConsentProps = object

Defined in: OAuthConsent/OAuthConsent.tsx:65

Props for the OAuthConsent component.

Properties​

clientLogoUrl?​

optional clientLogoUrl?: string

Defined in: OAuthConsent/OAuthConsent.tsx:73

URL of the client's logo or icon. When provided, renders the image above the consent heading. Falls back to the first letter of clientName if the image fails to load. When omitted, no logo is shown (backward-compatible).


clientName​

clientName: string

Defined in: OAuthConsent/OAuthConsent.tsx:67

Display name or identifier of the requesting OAuth client.


isAuthorizing?​

optional isAuthorizing?: boolean

Defined in: OAuthConsent/OAuthConsent.tsx:99

True while the authorize call is in flight (disables both buttons). The component also tracks its own internal loading state.


isValidRequest?​

optional isValidRequest?: boolean

Defined in: OAuthConsent/OAuthConsent.tsx:104

When false, renders the invalid-request error state instead of the form.

Default​

true

labels​

labels: OAuthConsentLabels

Defined in: OAuthConsent/OAuthConsent.tsx:106

All visible copy. Pre-translated by the consumer.


logoUri?​

optional logoUri?: string

Defined in: OAuthConsent/OAuthConsent.tsx:79

Logo URL sourced directly from the OAuth logo_uri parameter appended by the consent-redirect flow. Takes precedence over clientLogoUrl when both are provided; otherwise the two are interchangeable.


onAuthorize​

onAuthorize: (grantedScopes) => Promise<{ ok: boolean; }>

Defined in: OAuthConsent/OAuthConsent.tsx:87

Called when the user approves. Receives the minimal granted scope set (top-most selected keys; implied descendants omitted). Return { ok: true } to signal success; the component then calls onAuthorized.

Parameters​

ParameterType
grantedScopesstring[]

Returns​

Promise<{ ok: boolean; }>


onAuthorized​

onAuthorized: () => void

Defined in: OAuthConsent/OAuthConsent.tsx:92

Called after a successful onAuthorize. Use this to redirect to the OAuth server's resumed /authorize URL. The component does not navigate itself.

Returns​

void


onDeny​

onDeny: () => void

Defined in: OAuthConsent/OAuthConsent.tsx:94

Called when the user clicks Deny. Use this to navigate away.

Returns​

void


scopes​

scopes: ConsentScope[]

Defined in: OAuthConsent/OAuthConsent.tsx:81

Scope tree to render.