webpods
Version:
Append-only log service with OAuth authentication
31 lines • 909 B
TypeScript
/**
* Provider-agnostic OAuth implementation
*/
/**
* Generate PKCE challenge
*/
export declare function generatePKCE(): {
codeVerifier: string;
codeChallenge: string;
};
/**
* Generate state for OAuth flow
*/
export declare function generateState(): string;
/**
* Get authorization URL for any provider
*/
export declare function getAuthorizationUrl(providerId: string, state: string, codeChallenge: string): Promise<string>;
/**
* Exchange authorization code for tokens
*/
export declare function exchangeCodeForTokens(providerId: string, code: string, codeVerifier: string): Promise<any>;
/**
* Get user info from any provider
*/
export declare function getUserInfo(providerId: string, accessToken: string): Promise<any>;
/**
* Validate that a provider is supported
*/
export declare function validateProvider(providerId: string): boolean;
//# sourceMappingURL=oauth-handlers.d.ts.map