我想在服务器上验证gmail访问令牌 (即在控制器的作用下)。 我可以通过以下代码获取访问令牌:
now I want to validate this access_token (received by onSignIn
function) by c# code on sever side.
I am sending email id & access_token to the sever by ajax call.
i have no idea what to do next , please help me. Thanks in advance
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
idToken = googleUser.Zi.access_token
id = profile.getId();
console.log('ID: ' + profile.getId());
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail());
ValidateAccessToken(id, idToken);
}