/** * Platform Authentication Service * Handles OAuth flows for different platforms */ /** * Check if the platform has a native SDK */ export declare const hasNativeSDK: (platform: string) => boolean; /** * Test API connectivity before making OAuth requests */ export declare const testApiConnectivity: () => Promise<{ success: boolean; message: string; details?: any; }>; /** * Initiate OAuth flow for a platform * Uses User JWT for authentication (TIER 2) */ export declare const initiateOAuth: (platform: string, _username?: string, options?: { returnUrl?: string | null; }) => Promise; /** * Force YouTube reconnection with consent screen to get refresh tokens * This is the key function to fix YouTube token expiry issues */ export declare const forceYouTubeReconnectionWithConsent: (username: string) => Promise; /** * Alternative method: Force consent by revoking existing permissions */ export declare const forceYouTubeReconnectionWithRevoke: (username: string) => Promise; /** * Fix YouTube connection for a specific user (like nicholase50) */ export declare const fixUserYouTubeConnection: (username: string) => Promise; /** * Force fresh YouTube reconnection with proper refresh token */ export declare const reconnectYouTube: (username: string) => Promise; /** * Initiate native authentication for platforms with SDKs */ export declare const initiateNativeAuth: (platform: string, username?: string) => Promise; /** * Check if a URL is an OAuth callback */ export declare const isOAuthCallback: (url: string) => boolean; /** * Exchange authorization code for access token * This would typically be done on a server, but we're simulating it here */ export declare const exchangeCodeForToken: (code: string, platform: string) => Promise; /** * Refresh YouTube tokens when they expire * This should be called when the backend reports token expiry */ export declare const refreshYouTubeTokens: () => Promise; /** * Test function to verify YouTube refresh token functionality * Call this in your app to test the YouTube connection */ export declare const testYouTubeRefreshToken: (username: string) => Promise; /** * Request email verification code */ export declare const requestEmailVerification: (email: string, testMode?: boolean) => Promise; /** * Verify email code */ export declare const verifyEmailCode: (email: string, code: string, testMode?: boolean) => Promise; /** * Check email verification status */ export declare const checkEmailVerificationStatus: (email: string, testMode?: boolean) => Promise; /** * Initialize platform auth service */ export declare const initializePlatformAuthService: () => void; //# sourceMappingURL=platformAuthService.d.ts.map