'React Native Webview Google Sign In(Android) error : Couldn't sign you in This browser or app may not be secure

Using React Native WebView and there are two options for login 1. LinkedIn (which is working properly) 2. Google Sign In which is not working it shows error : Couldn't Sign you in This browser or app may not be secure . This is Error of Google Sign InTry using a different browser. If you 're already using a support browser, you can try again to sign in



Solution 1:[1]

Please use User Agent correctly...

import { WebView } from 'react-native-webview';

<WebView source={{ uri: redirectUrl }}
                    userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36" />

https://github.com/react-native-webview/react-native-webview/blob/HEAD/docs/Getting-Started.md -setup for Android and IOS

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ganesh Moorthy A