Expand description
OAuth 2.1 and OpenID Connect provider support for OpenAuth.
This crate ports the server-side Better Auth oauth-provider behavior into
idiomatic Rust. It is intentionally separate from openauth-oauth, which
contains OAuth client and social-provider primitives.
Modules§
Structs§
- Consent
Grant Input - Input for creating or updating an OAuth consent grant.
- CreateO
Auth Client Input - OAuth
Access Token - Stored opaque OAuth access token row.
- OAuth
Client - OAuth 2.0 Dynamic Client Registration payload/response.
- OAuth
Consent - Stored OAuth consent row.
- OAuth
Provider Error - OAuth provider runtime error.
- OAuth
Provider Options - User-facing OAuth provider plugin options.
- OAuth
Provider Plugin - OAuth provider extension returned by
crate::oauth_provider. - OAuth
Refresh Token - Stored OAuth refresh token row.
- ResolvedO
Auth Provider Options - Fully resolved OAuth provider options after upstream-compatible defaults.
- Schema
Client - Stored OAuth client row.
- Token
Response
Enums§
- Authorize
Decision - Grant
Type - Supported token endpoint grant types.
- OAuth
Provider Config Error - OAuth provider configuration errors.
- Secret
Storage - Storage strategy for OAuth provider secrets and tokens.
- Token
Endpoint Auth Method - OAuth token endpoint client authentication method.
Constants§
- OAUTH_
ACCESS_ TOKEN_ MODEL - OAUTH_
CLIENT_ MODEL - OAUTH_
CONSENT_ MODEL - OAUTH_
REFRESH_ TOKEN_ MODEL - VERSION
- Current crate version.
Functions§
- auth_
server_ metadata - check_
oauth_ client - create_
client_ credentials_ token - decide_
authorize - decode_
refresh_ token - delete_
consent - find_
consent - has_
granted_ scopes - oauth_
provider - Build the OAuth provider extension.
- oauth_
provider_ schema - Database schema contributions for the OAuth provider plugin.
- oauth_
to_ schema - oidc_
server_ metadata - schema_
to_ oauth - store_
client_ secret - store_
token - upsert_
consent - verify_
client_ secret