nativescript-oauth2
nativescript-oauth2 copied to clipboard
Google Oauth Couldn't get user profile information such as fullname and profile pic
On IOS, I'm trying to get user fullname and profile pic after google auth. With below config, I'm using idtoken to get these data. Scope in Google Console are Oauth openid, email and profile
https://oauth2.googleapis.com/tokeninfo?id_token=+<ID_TOKEN>
returns email and other staff only
exports.configureOAuthProviders = configureOAuthProviders;
function configureOAuthProviderGoogle() {
var googleProviderOptions = {
openIdSupport: "oid-full",
clientId: "<project-id>.apps.googleusercontent.com",
redirectUri: "com.googleusercontent.apps.<project-id>:/auth",
urlScheme: "com.googleusercontent.apps.<project-id>",
scopes: ["openid","email","profile"]
};
var googleProvider = new providers_1.TnsOaProviderGoogle(googleProviderOptions);
return googleProvider;
}
Yes, Same issue I am facing too. In the result object, I am just getting the value of accessToken, accessTokenExpiration, idToken, idTokenExpiration, refreshToken, refreshTokenExpiration. Not able to get user info like name, email, profile. Even I gone through youtube demo tutorial : https://www.youtube.com/watch?v=Ix0bXZeyhK0&list=PLPZA5f_u3nIb7HDwaocdGB3qpSlpYhdBa&index=2&t=1141s
but did not get the result.
same here
Getting the same issue here too, and unsure on how to fix. Is the project actively maintained?