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

Xamarin Google Auth

$
0
0

I posted the below on StackOverflow with no luck, maybe somebody here can assist.

I am attempting to implement backend server authentication for my App Service in Azure using Google. I used
the guide at causerexception com/2017/12/03/google-native-login-with-xamarin-forms/ to implement authentication in my app. It works until I add in .RequestIdToken(serverClientId or .RequestServerAuthCode.

public GoogleManager()
{
Instance = this;
String serverClientId = "XXXXXXXXXXXXX";
GoogleSignInOptions gso = new
GoogleSignInOptions.Builder(GoogleSignInOptions.DefaultSignIn)
.RequestEmail()
.RequestServerAuthCode(serverClientId)
.Build();

    _googleApiClient = new 
 GoogleApiClient.Builder(((MainActivity)Forms.Context).ApplicationContext)
        .AddConnectionCallbacks(this)
        .AddOnConnectionFailedListener(this)
        .AddApi(Auth.GOOGLE_SIGN_IN_API, gso)
        .AddScope(new Scope(Scopes.Profile))                
        .Build();
}

I have verify that my ClientID and ClientSecret are the same in both Azure, GoogleAPIs, and the Xamarin App. The will return GoogleApi will return a status code of 10 when it fails but I can't find any message that associates to that. I believe it has something to do with the ClientId I provided. I have been stuck on this for 4 days now, so any help is greatly appreciated.

THANKS!!


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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