How to use the expo-google-sign-in.initAsync function in expo-google-sign-in

To help you get started, we’ve selected a few expo-google-sign-in examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / apps / native-component-list / src / screens / GoogleSignInScreen.tsx View on Github external
_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();
  }
github dooboolab / hackatalk-mobile / src / components / screen / Login.tsx View on Github external
const initAsync = async (): Promise => {
    await GoogleSignIn.initAsync({
      clientId: iOSClientId,
    });
  };
github wheatandcat / Peperomia / PeperomiaNative / src / containers / Auth.tsx View on Github external
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,

expo-google-sign-in

Deprecated Expo module to enable native Google authentication

MIT
Latest version published 3 years ago

Package Health Score

36 / 100
Full package analysis

Similar packages