Answer the question
In order to leave comments, you need to log in
How to register a user with google account?
How to implement registration and login to the application through a google account?
Now we have implemented only for FaceBook - everything is simple here, we enter data, get json in response, take a token and send it to our server. On the server, we go to Facebook and get the user by the token, take the mail and write to the database. At the exit, we give cookies with which the user runs to us.
I would like a similar mechanism for google accounts.
Answer the question
In order to leave comments, you need to log in
Here we register the application and take the keys
https://console.developers.google.com/apis/credentials
We receive data about the user on the client.
On flutter, the google_sign_in library, but it is also possible for other platforms
Helmet to the ID Token
server On the .net server, install the Google.Apis.Auth library from nuget
GoogleJsonWebSignature.Payload googleUser = await GoogleJsonWebSignature.ValidateAsync(idToken, new GoogleJsonWebSignature.ValidationSettings()
{
Audience = new List<string> { googleSettings.AppId }
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question