Skip to main content

Module oauth_provider

Module oauth_provider 

Source
Expand description

OAuth authorization-server discovery from installed issuer and provider policy.

Structs§

CreateOAuthClientInput
Metadata accepted when an authenticated owner registers a managed client.
OAuthAuthenticatedClient
A client authenticated for a trusted server operation.
OAuthClientAssertionInput
OAuthClientAuthenticationOptions
Caller policy for the authenticateClient server capability.
OAuthClientMetadata
OAuth metadata supplied by the first-party document validator, not a discovery callback.
OAuthClientMetadataAbortSignal
Cancellation exposed to an application-owned client metadata transport.
OAuthClientMetadataFetchOptions
Actual options supplied to a configured metadata resource fetch callback.
OAuthClientMetadataFetchResponse
A streaming HTTP response and its redirect history, matching a fetch Response.
OAuthClientPrivilegeContext
Actual authenticated context passed to an operator client-privilege decision. The pinned hook receives no client or reference identifier.
OAuthClientRegistrationResult
Durable registration result, rather than an HTTP registration response.
OAuthConsentReferenceContext
Consent authority selection after post-login interaction. No request headers or client are supplied by the pinned callback contract.
OAuthDecodedRefreshToken
Decoded storage preimage. In 1.7.7 consumers use the persisted session binding, not this optional callback-supplied session ID.
OAuthExtensionClaims
OAuthExtensionClientAuthentication
OAuthExtensionGrantInput
OAuthInitialAccessTokenAuthorization
Admission independent of a user session. An optional application reference owns the client.
OAuthInitialAccessTokenInput
The actual credential, caller headers and parsed registration request, before defaults.
OAuthInteractionContext
Authenticated post-login policy input. The pinned callback does not receive a client argument; admission has already validated the requesting client.
OAuthMetadataExtensionInput
OAuthPostLoginConfig
Application interaction after signup policy and before consent.
OAuthProviderConfig
Immutable policy shared by authorization-server metadata and grant admission.
OAuthProviderExtension
One configured extension. Dispatched URI keys must be disjoint across extensions.
OAuthProviderPlugin
OAuthProviderRateLimits
OAuth protocol endpoint policies, in seconds and requests per client/path. Rules are effective only when application rate limiting is enabled; its storage and ordered custom rules remain authoritative.
OAuthRequestUriInput
The original request URI and URL-supplied client identity, before schema parsing.
OAuthResourcePrivilegeContext
Authenticated operator input for resource catalog and client-resource link management.
OAuthSelectAccountConfig
OAuthSignupConfig
OAuthTokenClaimsInput
OAuthTokenIssueParams
Inputs authorized by a trusted grant handler or companion endpoint. Supplying these does not repeat client authentication or scope admission.
OAuthUserInfoClaimsInput
OAuthVerifiedClientAssertion
RegisterClientMetadataDocumentInput
RegisterOAuthClientInput
Dynamic registration metadata. Requested resources admit additions to server defaults; unlike scopes, they narrow which optional resource capabilities become durable links.

Enums§

OAuthEndpointRateLimit
A provider rule can inherit its endpoint default, replace it, or be omitted. Disabled omits only the plugin rule: global/application policy still applies.
OAuthInitialAccessTokenError
Explicit endpoint failures retain their status, body and headers. Ordinary application failures are deliberately hidden behind the registration endpoint’s OAuth server error.
OAuthMetadataType
OAuthRefreshTokenEncryption
A synchronous value or an asynchronous encryption callback result.
OAuthResourceSeedMode
Restart policy for configured resource rows. The pinned replacement mode is overwrite.
OAuthSignupRedirect
Better Auth’s boolean-or-string signup decision. An empty page string, like false, continues authorization; true uses the configured page fallback.

Traits§

OAuthClientAuthenticationStrategy
OAuthClientDiscovery
A stable external source of OAuth clients, matching a contributed TS ClientDiscovery.
OAuthClientIdGenerator
Application-owned client identifiers. Empty output is preserved, matching the reference.
OAuthClientMetadataResourceFetch
Application-owned network boundary for a discovered client’s referenced resources.
OAuthClientPrivileges
OAuthClientSecretCipher
Custom reversible client-secret storage, matching storeClientSecret.encrypt and decrypt.
OAuthClientSecretGenerator
Application-owned client credential generation. Empty output uses the default generator.
OAuthClientSecretHasher
Custom client-secret hash storage, matching storeClientSecret.hash and optional verify.
OAuthConsentReference
OAuthExtensionGrantHandler
A trusted companion owns grant-specific admission; no client is fabricated or pre-authorized.
OAuthInitialAccessTokenValidator
Application-owned async initial-access-token policy. None rejects the credential.
OAuthMetadataContributor
OAuthPostLoginPolicy
OAuthProviderApi
Live provider capabilities bound to the actual call and its optional grant.
OAuthRedirectUriValidator
Application redirect trust decision. URI safety remains provider-owned.
OAuthRefreshTokenFormatter
Better Auth’s formatRefreshToken. Both callbacks are required by its types; absence of the whole formatter preserves raw refresh credentials.
OAuthRequestUriResolver
Application-owned asynchronous authorization request lookup.
OAuthResourceIdentifierValidator
Application identifier validation replaces the default absolute-URI/fragment check.
OAuthResourcePrivileges
OAuthSelectAccountPolicy
Additional account selection on initial authorization only, after authentication.
OAuthSignupPolicy
OAuthTokenClaimsContributor
OAuthTokenGenerator
Application-owned opaque access/refresh credentials. The admitted issuance params provide native context without additional user or client lookups. Empty output is preserved; only an absent configured generator uses randomness.
OAuthTokenHasher
Custom opaque-token storage matching Better Auth’s storeTokens.hash callback. kind identifies the token domain; trusted callers may also supply application kinds.
OAuthUserInfoClaimsContributor

Functions§

consume_client_assertion
Check assertion hygiene and atomically consume its durable replay identifier.

Type Aliases§

OAuthAuthorizationQuery
Authorization parameters with JavaScript-compatible extension values.
OAuthPostLoginContext
OAuthSelectAccountContext
OAuthSignupContext
Authenticated input to the application’s additional registration decision. Headers come from the physical authorization request, not logical API headers.