I implemented google sign in using ionic cloud , everything works fine and i get back ‘token’ and user details .pretty smooth right ? now i want the access token from google signin so that i can send it to my back end server (.net web api ) and get the local token for my services . Is this possible ??
I need the access token to verify the validity of the token on my back end server
“https://www.googleapis.com/oauth2/v1/tokeninfo?access_token={0}”
I am implementing Google Native Authentication and login successfully with token. but I need access token. Any idea how get access_token?
window.plugins.googleplus.login(
{},
function (user_data) {
// For the purpose of this example I will store user data on local storage
UserService.setUser({
userID: user_data.userId,
name: user_data.displayName,
email: user_data.email,
picture: user_data.imageUrl,
accessToken: user_data.accessToken,
idToken: user_data.idToken
});
$ionicLoading.hide();
$state.go('app.home');
},
function (msg) {
$ionicLoading.hide();
}
);
google sign in example
refer to this article , it might help you