1.2.0 • Published 6 years ago

asq-react-native-google-sign-in v1.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

React Native Google Sign In

Minimalistic implementation of Google's sign in SDK. Authenticates using public profile and email scopes. Sign in returns token data required to authenticate user serverside.

Installation

Minimum Requirements

react-nativeiOS
0.5010.3

NPM package

npm install asq-react-native-google-sign-in

Getting started

  1. Install GoogleSignIn via cocoapods: add pod 'GoogleSignIn' to your Podfile and run pod install

  2. Add node-modules/asq-react-native-google-sign-in/ios/ASQGoogleSignIn.xcodeproj to your Libraries

  3. Add libASQGoogleSignIn.a under Link Binary With Libraries in Build Phases

  4. Add $(SRCROOT)/../node_modules/asq-react-native-google-sign-in/ios/ASQGoogleSignIn to your Header Search Paths in Build Settings

  5. Make sure you have your GoogleServices-Info.plist located in root of project directory (where Info.plist is located)

  6. Add following to AppDelegate.m file

// Import at the top of your file
#import "ASQGoogleSignIn.h"

// Add to handle google's deep links (place before @end)
- (BOOL)application:(UIApplication *)application
        openURL:(NSURL *)url
        options:(NSDictionary<NSString *, id> *)options {

  BOOL googleLink = [ASQGoogleSignIn handleURL:url
                             sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
                                    annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];

  return googleLink;
}

Usage

import GoogleSignIn from "asq-react-native-google-sign-in";

signIn

const user = await GoogleSignIn.signIn();

signOut

GoogleSignIn.signOut();
1.2.0

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago