import * as hono_utils_jwt_types from 'hono/utils/jwt/types'; import { Provider } from './provider.js'; import { Oauth2WrappedConfig, Oauth2Token } from './oauth2.js'; import { OidcWrappedConfig } from './oidc.js'; import 'hono'; import '../storage/storage.js'; interface AppleConfig extends Oauth2WrappedConfig { /** * The response mode to use for the authorization request. * Apple requires 'form_post' response mode when requesting name or email scopes. * @default "query" */ responseMode?: "query" | "form_post"; } interface AppleOidcConfig extends OidcWrappedConfig { } /** * Create an Apple OAuth2 provider. * * @param config - The config for the provider. * @example * ```ts * // Using default query response mode (GET callback) * AppleProvider({ * clientID: "1234567890", * clientSecret: "0987654321" * }) * * // Using form_post response mode (POST callback) * // Required when requesting name or email scope * AppleProvider({ * clientID: "1234567890", * clientSecret: "0987654321", * responseMode: "form_post", * scopes: ["name", "email"] * }) * ``` */ declare function AppleProvider(config: AppleConfig): Provider<{ tokenset: Oauth2Token; clientID: string; }>; /** * Create an Apple OIDC provider. * * This is useful if you just want to verify the user's email address. * Includes support for client_credentials flow using Apple ID Token. * * @param config - The config for the provider. * @example * ```ts * AppleOidcProvider({ * clientID: "1234567890", * clientSecret: "your-client-secret" // Required for Apple OIDC * }) * ``` */ declare function AppleOidcProvider(config: AppleOidcConfig): Provider<{ id: hono_utils_jwt_types.JWTPayload; clientID: string; }>; export { type AppleConfig, type AppleOidcConfig, AppleOidcProvider, AppleProvider };