Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Google auth crashes application

$
0
0

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


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>