Home > OS >  Can I set user agent for embedded web view in both iOS and android apps for Google Login?
Can I set user agent for embedded web view in both iOS and android apps for Google Login?

Time:09-25

I have an app on both iOS and android platforms where I am using WKWebView for login using a Google account. I get this error message Authorization Error 403: disallowed_useragent. As mentioned in other older posts, can I set custom user agent for web view as a workaround. Is it still a viable solution considering Google will not allow web view to use Google Sign In.

CodePudding user response:

There is information here about what to do on Android and iOS instead of using embedded webviews: https://developers.googleblog.com/2021/06/upcoming-security-changes-to-googles-oauth-2.0-authorization-endpoint.html#instructions

On Android, you can use Android Custom Tabs and on iOS, you can use SFSafariViewController.

  • Related