@team-lepisode/capacitor-google-login
v8.1.0
Published
Capacitor Plugin for Google Login
Readme
@team-lepisode/capacitor-google-login
Capacitor Plugin for Google Login
Install
npm install @team-lepisode/capacitor-google-login
npx cap synciOS dependency
The iOS implementation uses Google's official GoogleSignIn SDK. Make sure the host app configures the Google URL scheme and iOS client ID as described in Google's iOS setup guide before building for iOS.
API
initialize(...)
initialize(options: GoogleClientInitializationOptions) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------------------------------------------------------------- |
| options | GoogleClientInitializationOptions |
login()
login() => Promise<GoogleLoginResponse>Returns: Promise<GoogleLoginResponse>
logout()
logout() => Promise<void>Interfaces
GoogleClientInitializationOptions
| Prop | Type |
| ------------- | -------------------------------------------------------------------------------------------------- |
| android | { clientId: string; } |
| ios | { clientId: string; clientSecret?: string; urlScheme?: string; clientName?: string; } |
| web | { clientId: string; scopes?: string[]; prompt?: string; timeoutMs?: number; } |
GoogleLoginResponse
| Prop | Type |
| ------------------ | ------------------- |
| id | string |
| accessToken | string |
| refreshToken | string |
| idToken | string |
| tokenType | string |
| email | string |
| name | string |
| displayName | string |
| familyName | string |
| givenName | string |
| imageUrl | string |
