Skip to content
Capacitor plugin for Google Auth.
Branch: master
Clone or download
parveenkhtkr Merge pull request #3 from Monomachus/master
For accessToken to be exposed needed to pass param
Latest commit 5a465b3 Jun 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android Initial May 19, 2019
ios Google SignIn iOS & Web May 19, 2019
src Formatting Jun 3, 2019
.gitignore Initial May 19, 2019
.npmignore Initial May 19, 2019
CodetrixStudioCapacitorGoogleAuth.podspec Google SignIn iOS & Web May 19, 2019
LICENSE Create LICENSE May 24, 2019
README.md Update README.md May 24, 2019
package-lock.json Bumping version to 0.0.5 Jun 3, 2019
package.json Bumping version to 0.0.5 Jun 3, 2019
rollup.config.js Initial May 19, 2019
tsconfig.json Initial May 19, 2019

README.md

CapacitorGoogleAuth

Capacitor plugin for Google Auth.

Install

npm i --save @codetrix-studio/capacitor-google-auth

npx cap update

WEB

Add clientId meta tag to head.

<meta name="google-signin-client_id" content="{your client id here}">

Register the plugin by importing it.

import "@codetrix-studio/capacitor-google-auth";

Use it

import { Plugins } from '@capacitor/core';
Plugins.GoogleAuth.signIn();

AngularFire2

async googleSignIn() {
  let googleUser = await Plugins.GoogleAuth.signIn();
  const credential = auth.GoogleAuthProvider.credential(googleUser.authentication.idToken);
  return this.afAuth.auth.signInAndRetrieveDataWithCredential(credential);
}

iOS

Make sure you have GoogleService-Info.plist with CLIENT_ID

Add REVERSED_CLIENT_ID as url scheme to Info.plist

Support

✔️ iOS

✔️ Web

🔜 Android

You can’t perform that action at this time.