import { a8 as ProviderOptions, O as OAuth2Tokens } from '../shared/better-auth.WtOxsS45.cjs'; export { a as OAuthProvider } from '../shared/better-auth.WtOxsS45.cjs'; import * as jose from 'jose'; import { G as GenericEndpointContext, U as User, u as Account } from '../shared/better-auth.DijUyhfq.cjs'; import '../shared/better-auth.Bi8FQwDD.cjs'; import 'zod'; import 'kysely'; import 'better-call'; import 'better-sqlite3'; declare function createAuthorizationURL({ id, options, authorizationEndpoint, state, codeVerifier, scopes, claims, redirectURI, duration, prompt, accessType, responseType, display, loginHint, hd, responseMode, additionalParams, scopeJoiner, }: { id: string; options: ProviderOptions; redirectURI: string; authorizationEndpoint: string; state: string; codeVerifier?: string; scopes: string[]; claims?: string[]; duration?: string; prompt?: string; accessType?: string; responseType?: string; display?: string; loginHint?: string; hd?: string; responseMode?: string; additionalParams?: Record; scopeJoiner?: string; }): Promise; declare function validateAuthorizationCode({ code, codeVerifier, redirectURI, options, tokenEndpoint, authentication, deviceId, }: { code: string; redirectURI: string; options: ProviderOptions; codeVerifier?: string; deviceId?: string; tokenEndpoint: string; authentication?: "basic" | "post"; }): Promise; declare function validateToken(token: string, jwksEndpoint: string): Promise>; declare function refreshAccessToken({ refreshToken, options, tokenEndpoint, authentication, extraParams, grantType, }: { refreshToken: string; options: ProviderOptions; tokenEndpoint: string; authentication?: "basic" | "post"; extraParams?: Record; grantType?: string; }): Promise; declare function generateCodeChallenge(codeVerifier: string): Promise; declare function getOAuth2Tokens(data: Record): OAuth2Tokens; declare function generateState(c: GenericEndpointContext, link?: { email: string; userId: string; }): Promise<{ state: string; codeVerifier: string; }>; declare function parseState(c: GenericEndpointContext): Promise<{ codeVerifier: string; expiresAt: number; callbackURL: string; errorURL?: string | undefined; newUserURL?: string | undefined; link?: { email: string; userId: string; } | undefined; requestSignUp?: boolean | undefined; }>; declare function handleOAuthUserInfo(c: GenericEndpointContext, { userInfo, account, callbackURL, disableSignUp, }: { userInfo: Omit; account: Omit; callbackURL?: string; disableSignUp?: boolean; }): Promise<{ error: string; data: null; isRegister?: undefined; } | { error: string; data: null; isRegister: boolean; } | { data: { session: { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; }; user: { id: string; name: string; email: string; emailVerified: boolean; createdAt: Date; updatedAt: Date; image?: string | null | undefined; }; }; error: null; isRegister: boolean; }>; export { OAuth2Tokens, ProviderOptions, createAuthorizationURL, generateCodeChallenge, generateState, getOAuth2Tokens, handleOAuthUserInfo, parseState, refreshAccessToken, validateAuthorizationCode, validateToken };