4

On standalone app it showing You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure this and nothing happening. But in emulator everything is working fine.

my code

import * as GoogleSignIn  from 'expo-auth-session/providers/google';

WebBrowser.maybeCompleteAuthSession();

    const [request, response, promptAsync] = GoogleSignIn .useAuthRequest({
       expoClientId: 'id',
       androidClientId: 'id', 
    });
  
    useEffect(() => {
      if (response?.type === 'success') {
        const { authentication } = response;
        }
    }, [response]);
  • 1
    Any update on this? I'm having the same issue. Only tried on emulator currently, but not working on Android. Works fine on iOS – pbrune Aug 24 '22 at 22:50
  • 1
    yes! pass this parameter into you promptAsync function like this "promptAsync({ useProxy: false, showInRecents: true })" and make sure u have generated the SH key as the doc said it will work on emulator when the useProxy params is passed true and when on build apk make sure thats remain false. – Abdus Sattar Nishad Aug 25 '22 at 04:59

0 Answers0