Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin.Auth getting disallowed_useragent error [Xamarin.Forms]

I was trying to implement login with Google and Facebook. I have successfully implemented Facebook login with Xamarin.Auth but in the Google Login I am getting error disallowed_useragent, I know Google has changed their policy and will not allow the login using WebView but is there any other way to implement Login with Google in Xamarin.Forms (Portable)?

enter image description here

Thank You.

like image 670
Chandresh Khambhayata Avatar asked Feb 15 '26 00:02

Chandresh Khambhayata


1 Answers

It's a new Google restriction, they do not allow using their login interface in embedded webviews anymore. Therefore you can implement authorization for your app in "Native Views" - external browsers (chrome tabs, safari etc). They will return result back to your app.

The working example for Google is here: Authenticating Users with an Identity Provider

like image 139
Nick Kovalsky Avatar answered Feb 16 '26 16:02

Nick Kovalsky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!