import { GenericOAuthConfig, GenericOAuthOptions, GenericOAuthUserInfo } from "./types.mjs"; import { Auth0Options, auth0 } from "./providers/auth0.mjs"; import { GumroadOptions, gumroad } from "./providers/gumroad.mjs"; import { HubSpotOptions, hubspot } from "./providers/hubspot.mjs"; import { KeycloakOptions, keycloak } from "./providers/keycloak.mjs"; import { LineOptions, line } from "./providers/line.mjs"; import { MicrosoftEntraIdOptions, microsoftEntraId } from "./providers/microsoft-entra-id.mjs"; import { OktaOptions, okta } from "./providers/okta.mjs"; import { PatreonOptions, patreon } from "./providers/patreon.mjs"; import { SlackOptions, slack } from "./providers/slack.mjs"; import { YandexOptions, yandex } from "./providers/yandex.mjs"; import "./providers/index.mjs"; import { AuthContext } from "@better-auth/core"; import { OAuthProvider } from "@better-auth/core/oauth2"; declare module "@better-auth/core" { interface BetterAuthPluginRegistry { "generic-oauth": { creator: typeof genericOAuth; }; } } /** * Base type for OAuth provider options. * Extracts common fields from GenericOAuthConfig for provider helpers. */ export type BaseOAuthProviderOptions = Pick; type PendingDiscovery = Map; /** * A generic OAuth plugin that registers any OAuth/OIDC provider * as a first-class social provider. * * Providers are used through the standard `signIn.social` and * `callback/:id` core endpoints — no plugin-specific endpoints needed. */ export declare const genericOAuth: (options: GenericOAuthOptions) => { id: "generic-oauth"; version: string; init: (ctx: AuthContext) => Promise<{ context: { socialProviders: OAuthProvider>>[]; genericOAuthPendingDiscovery: PendingDiscovery; }; }>; hooks: { before: { matcher: (context: import("@better-auth/core").HookEndpointContext) => boolean; handler: import("better-call").Middleware) => Promise>; }[]; }; options: GenericOAuthOptions; $ERROR_CODES: { INVALID_OAUTH_CONFIGURATION: import("@better-auth/core/utils/error-codes").RawError<"INVALID_OAUTH_CONFIGURATION">; TOKEN_URL_NOT_FOUND: import("@better-auth/core/utils/error-codes").RawError<"TOKEN_URL_NOT_FOUND">; }; }; export { type Auth0Options, type GenericOAuthConfig, type GenericOAuthOptions, type GenericOAuthUserInfo, type GumroadOptions, type HubSpotOptions, type KeycloakOptions, type LineOptions, type MicrosoftEntraIdOptions, type OktaOptions, type PatreonOptions, type SlackOptions, type YandexOptions, auth0, gumroad, hubspot, keycloak, line, microsoftEntraId, okta, patreon, slack, yandex };