Forum Xamarin.Forms

Unable to "Continue with Google" or "Continue with Facebook" using WebView

SteveRussellSteveRussell Member ✭✭✭

I am directing a user to trustpilot in a webview where they can make a review. I want the user to stay in the app while reviewing so I don't want to open an external browser. The user should be able to sign in with Google or Facebook to make the review, but currently their only option is by email.

I am aware that Google blocks OAuth requests from embedded browsers, but what can I do to allow users to sign in with their Google or Facebook accounts on a webview?

In case it changes anyone's answer, the webpage in the WebView is not my own, so I cannot make any changes in the html.

The issue I have can be seen in this video:

https://streamable.com/l493c

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    Google now requires us to use the system browser app to do the Google authentication. To login with the account in webview, try to use the Plugin.GoogleClient plugin which could help handle Google authentication in appliation.

    Similar issue:
    https://forums.xamarin.com/discussion/comment/343659/#Comment_343659

  • SteveRussellSteveRussell Member ✭✭✭

    Thank you! After user has logged in using Plugin.GoogleClient, would the Continue with Google button in the WebView work?

    I will test it either way but if you know the answer to it that'd be great

  • JarvanJarvan Member, Xamarin Team Xamurai
    edited April 2

    After user has logged in using Plugin.GoogleClient, would the Continue with Google button in the WebView work?

    You can test the official sample of the plugin to check it through this link.

Sign In or Register to comment.