react-native-google-sign-in
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -114,2 +114,20 @@ const ReactNative = require('react-native'); | ||
// Sign in without a prompt | ||
// If accessToken is expiring, refresh it | ||
signInSilentlyPromise() { | ||
return new Promise((resolve, reject) => { | ||
const offSuccess = GoogleSignIn.onSignIn((data) => { | ||
offSuccess(); | ||
offError(); | ||
resolve(GoogleSignIn.normalizeUser(data)); | ||
}); | ||
const offError = GoogleSignIn.onSignInError((error) => { | ||
offSuccess(); | ||
offError(); | ||
reject(error); | ||
}); | ||
RNGoogleSignIn.signInSilently(); | ||
}); | ||
}, | ||
disconnect() { | ||
@@ -116,0 +134,0 @@ RNGoogleSignIn.disconnect(); |
@@ -121,2 +121,20 @@ const ReactNative = require('react-native'); | ||
// Sign in without a prompt | ||
// If accessToken is expiring, refresh it | ||
signInSilentlyPromise() { | ||
return new Promise((resolve, reject) => { | ||
const offSuccess = GoogleSignIn.onSignIn((data) => { | ||
offSuccess(); | ||
offError(); | ||
resolve(GoogleSignIn.normalizeUser(data)); | ||
}); | ||
const offError = GoogleSignIn.onSignInError((error) => { | ||
offSuccess(); | ||
offError(); | ||
reject(error); | ||
}); | ||
RNGoogleSignIn.signInSilently(); | ||
}); | ||
}, | ||
disconnect() { | ||
@@ -123,0 +141,0 @@ RNGoogleSignIn.disconnect(); |
{ | ||
"name": "react-native-google-sign-in", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "React Native Wrapper for Google Sign-In OAuth SDK / API", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
51661
299