[Xamarin.Auth][Android][Google] How to properly use OAuth2Authenticator?

tkowalczyktkowalczyk PLMember, University ✭✭

Hi All,
I'm using my own LoginGoogleViewRendererto give ability users to authenticate with Google credentials.
My code is below everything is almost fine but after I agree with terms from Google about my data I can see some kind of alert message which appears only for miliseconds so I'm not able to see this message and then it's disappear and I can see a log info in console but similiar to this post I can't see any content. Here is the code:

    `var auth = new OAuth2Authenticator(
            clientId: "xxxxxx",
            clientSecret: "xxxx",
            scope: "openid",
            authorizeUrl: new Uri("https://accounts.google.com/o/oauth2/auth"),
            redirectUrl: new Uri("http://localhost"),
            accessTokenUrl: new Uri("https://accounts.google.com/o/oauth2/token"),
            getUsernameAsync: null

        auth.Completed += (sender, eventArgs) =>
            if (eventArgs.IsAuthenticated)
                //// Use eventArgs.Account to do wonderful things
                //// Use for store auth service name
                Console.WriteLine("User authenticated");
                // The user cancelled
Sign In or Register to comment.