Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_configureAsync = async () => {
try {
await GoogleSignIn.initAsync({
isOfflineEnabled: false,
isPromptEnabled: true,
clientId:
'603386649315-vp4revvrcgrcjme51ebuhbkbspl048l9.apps.googleusercontent.com',
});
} catch ({ message }) {
console.error('Demo: Error: init: ' + message);
}
this._syncUserWithStateAsync();
}
const initAsync = async (): Promise => {
await GoogleSignIn.initAsync({
clientId: iOSClientId,
});
};
useDidMount(() => {
if (isStandaloneAndAndroid()) {
const androidClientId = process.env.GOOGLE_LOGIN_ANDROID_CLIENT_ID;
try {
GoogleSignIn.initAsync({
clientId: String(androidClientId),
});
} catch ({ message }) {
Sentry.captureMessage(JSON.stringify(message));
}
}
const checkLogin = async () => {
const login = await loggedIn();
if (login && !state.uid) {
const uid = await AsyncStorage.getItem('uid');
if (uid) {
setState(s => ({
...s,
uid,