generic-oauth2 icon indicating copy to clipboard operation
generic-oauth2 copied to clipboard

Google OAuth 2 on Android

Open br0ll opened this issue 3 years ago • 1 comments

Hey! Great plugin, haven't had any issues on iOS. However, OAuth on Android seems to open in an in app browser, which Google has disallowed since 2017. This makes Google mad, presenting a 403: disallowed_useragent error. Trying to configure the Android Capacitor useragent to another useragent made no change.

I have so far only tested this on the simulator in Android Studio, so I figured I would ask if this is an expected issue and if there is a way to for example force the plugin to open the user interface in the default browser or elsewhere, which Google would accept?

br0ll avatar Jan 29 '22 11:01 br0ll

Looks like you need to provide your own custom handler for that.

I decided to use https://www.npmjs.com/package/@codetrix-studio/capacitor-google-auth instead for google auth on Android.

confuzeus avatar Dec 04 '22 19:12 confuzeus