I am using google auth through a webview in xamarin.forms [android app] and after the user authenticates, the application crashes, and i am unable to move forward. Here's a snippet of the code :
public async Task<bool> AuthenticateCompletely()
{
await AuthenticateWithGoogle();
if (AuthUserProfile != null)
await AuthenticateWithBackend();
return App.CurrentUser != null;
}
async Task AuthenticateWithGoogle()
{
await ShowGoogleAuthenticationView();
if (App.AuthToken == null)
return false;
await GetUserProfile();
return AuthUserProfile != null;
}
async Task ShowGoogleAuthenticationView()
{
if (App.AuthToken != null && Settings.Instance.User != null)
{
var success = await GetUserProfile();
if (success)
{
AzureService.Instance.Client.CurrentUser = Settings.Instance.User;
return;
}
}
try
{
AuthenticationStatus = "Loading...";
MobileServiceUser user = await _authenticator.DisplayWebView();
it seems that at the webview is where it's crashing