I'm trying to implement Google Sign In in my ASP.net application.
I have implemented the javascript code from Integrating Google Sign-In into your web app and that works but I need to store a Google User ID in my Database for identification in future logins.
The page states that I shouldn't use the profile.getId but I should send the googleUser.getAuthResponse().id_token to the backend and validate this token.
Well I've sent this huge bundle of characters to the backend but I can't seem to figure out how to validate this bundle of characters and retrieve a useful identification ID (which should stay the same for a Google User) from this data bundle.
I've taken a look at:
protected void Page_Load(object sender, EventArgs e)
{
System.Threading.Tasks.Task<Google.Apis.Auth.GoogleJsonWebSignature.Payload> Sig = Google.Apis.Auth.GoogleJsonWebSignature.ValidateAsync(Request.Form["idToken"], null, true);
Sig.Wait();
}
But this just hangs in my Page_Load method.
Has anyone got this working?