Xamarin.Auth出现disallowed_useragent错误[Xamarin.Forms] [英] Xamarin.Auth getting disallowed_useragent error [Xamarin.Forms]
问题描述
我正尝试通过 Google 和 Facebook 实施登录.我已经成功使用 Xamarin.Auth 实现了 Facebook 登录,但是在 Google登录中却出现了错误 disallowed_useragent ,我知道Google已更改其政策,并且不允许使用WebView
登录,但是还有其他方法可以在Xamarin.Forms (Portable)
中实现Login with Google
吗?
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)
?
谢谢.
推荐答案
这是Google的一项新限制,他们不再允许在嵌入式网络视图中使用其登录界面.因此,您可以在本机视图"(外部浏览器(Chrome标签,Safari浏览器等))中为您的应用实施授权.他们会将结果返回给您的应用.
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.
适用于Google的示例如下: 使用身份提供者对用户进行身份验证
The working example for Google is here: Authenticating Users with an Identity Provider
这篇关于Xamarin.Auth出现disallowed_useragent错误[Xamarin.Forms]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!