UNPKG

react-native-google-auth

Version:

🚀 Modern React Native Google Authentication library with TypeScript support. Features latest Google Sign-In SDK, OAuth 2.0, One Tap Sign-In, token management, and cross-platform iOS/Android integration. Perfect for implementing Google Login, Google SSO,

45 lines • 1.78 kB
import type { ConfigureParams, User, SignInResponse, NoSavedCredentialFound, CancelledResponse, OneTapResponse, GetTokensResponse, RefreshTokensResponse, PlayServicesInfo } from './NativeGoogleAuth'; import { GoogleAuthScopes } from './NativeGoogleAuth'; export type { ConfigureParams, User, SignInResponse, NoSavedCredentialFound, CancelledResponse, OneTapResponse, GetTokensResponse, RefreshTokensResponse, PlayServicesInfo, }; export { GoogleAuthError, GoogleAuthErrorCodes, GoogleAuthStatusCodes, isGoogleAuthError, isErrorWithCode, createErrorResponse, mapNativeErrorCode, } from './errors'; export type { GoogleAuthErrorCode, GoogleAuthStatusCode } from './errors'; export { GoogleAuthScopes }; /** * Google Auth API */ export declare const GoogleAuth: { /** * Configure Google Sign-In with the provided parameters */ configure: (params: ConfigureParams) => Promise<void>; /** * Sign in with Google using One Tap or standard flow */ signIn: () => Promise<OneTapResponse>; /** * Sign out the current user */ signOut: () => Promise<void>; /** * Get access and ID tokens for the current user */ getTokens: () => Promise<GetTokensResponse>; /** * Refresh access and ID tokens for the current user */ refreshTokens: () => Promise<RefreshTokensResponse>; /** * Check if the current token is expired */ isTokenExpired: () => Promise<boolean>; /** * Get the current authenticated user */ getCurrentUser: () => Promise<User | null>; /** * Check Google Play Services availability (Android only) */ checkPlayServices: (showErrorDialog?: boolean) => Promise<PlayServicesInfo>; }; export default GoogleAuth; //# sourceMappingURL=index.d.ts.map