Preview 2.0 is now in Public Beta!
Read the Announcement


npm install @nativescript/google-signin



To access Google Sign-In, you'll need to make sure to register your application.

You don't need to include the google-services.json file in your app unless you are using Google services that require it. You do need to enable the OAuth APIs that you want, using the Google Cloud Platform API manager.

Make sure you've filled out all required fields in the console for OAuth consent screen. Otherwise, you may encounter APIException errors.

This plugin requires iOS 9.0 or higher.

First register your application. Make sure the file you download in step 1 is named GoogleService-Info.plist. Move or copy GoogleService-Info.plist into the App_Resources/iOS/. Open Xcode, then right-click on Runner directory and select Add Files to "Runner". Select GoogleService-Info.plist from the file manager. A dialog will show up and ask you to select the targets, select the Runner target. Then add the CFBundleURLTypes attributes below into the App_Resources/iOS/Info.plist file.

<!-- Google Sign-in Section -->
			<!-- TODO Replace this value: -->
			<!-- Copied from GoogleService-Info.plist key REVERSED_CLIENT_ID -->
<!-- End of the Google Sign-in Section -->

iOS additional requirement

Note that according to, starting June 30, 2020, apps that use login services must also offer a "Sign in with Apple" option when submitting to the Apple App Store.

Consider using this Apple sign in plugin


import { GoogleSignin } from '@nativescript/google-signin'

try {
  await GoogleSignin.configure()
  const user = await GoogleSignin.signIn()
} catch (e) {}


Ensure you've included xmlns:ui="@nativescript/google-signin" on the Page element

<ui:GoogleSigninButton tap="handleSignIn" />
import { GoogleSignin } from '@nativescript/google-signin'
export function handleSignIn(args) {
  try {
    await GoogleSignin.configure()
    const user = await GoogleSignin.signIn()
  } catch (e) {}

Angular usage

On your module.ts

import { registerElement } from '@nativescript/angular'
  () => require('@nativescript/google-signin').GoogleSignInButton

And then it can be called from your html file choosing the desired option for colorScheme and colorStyle as:

<GoogleSignInButton colorScheme='auto' colorStyle='standard' (tap)="yourGoogleSigninFunction()"></GoogleSignInButton>

colorScheme supports 'auto', 'dark' and 'light' options and colorStylesupports 'standard'. 'wide' and 'icon'. Since it's a button, you can also set some of its properties such as height or width.


It is mandatory to call this method before attempting to call signIn() and signInSilently(). In typical scenarios, configure needs to be called only once, after your app starts. All parameters are optional.


Prompts a modal to let the user sign in into your application. Resolved promise returns an user object. Rejects with error otherwise.


This method returns the current user and rejects with an error otherwise.


This method may be used to find out whether some user is currently signed in.


Checks if device has Google Play Services installed. Always resolves to true on iOS.

Presence of up-to-date Google Play Services is required to show the sign in modal, but it is not required to perform calls to configure and signInSilently. Therefore, we recommend to call hasPlayServices directly before signIn.

import { GoogleSignin } from '@nativescript/google-signin'

playServicesAvailable: boolean = await GoogleSignin.playServicesAvailable()


Signs out the current user.


Disconnects the current user.


Resolves with an object containing { idToken: string, accessToken: string, } or rejects with an error. Note that using accessToken for identity assertion on your backend server is discouraged.


This method resolves with null or user object.


Apache License Version 2.0