You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2019. It is now read-only.
Hi, I have integrated the plugin with our hapi server. Thanks for the plugin. When i click on Signin with Google buttton, it takes to the google page, when the user enters credentials and allow access to the application. Everything happens fine. But, the profile data is not being sent by google. Is there any settings that i miss?
if (profile) {
debugger;
// extract the relevant data from Profile to store in JWT object
var session = {
firstname: profile.name.givenName,
image: profile.image.url,
id: profile.id,
exp: Math.floor(new Date().getTime() / 1000) + 7 * 24 * 60 * 60,
agent: req.headers['user-agent']
};
// create a JWT to set as the cookie:
var token = JWT.sign(session, process.env.JWT_SECRET);
// store the Profile and Oauth tokens in the Redis DB using G+ id as key
// Detailed Example...? https://github.com/dwyl/hapi-auth-google/issues/2
console.log(profile);
// reply to client with a view
return reply("Hello " + profile.name.givenName + " You Logged in Using Goolge!")
.state('token', token); // see: http://hapijs.com/tutorials/cookies
}
else {
return reply("Sorry, something went wrong, please try again.");
}
It always enter the else loop in the above code. I really appreciate your help
The text was updated successfully, but these errors were encountered:
@keerthivasan-rapologies for taking so long to get back to you. did you figure it out?
Once you have the Oauth2 Token are you requesting the person's profile info?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi, I have integrated the plugin with our hapi server. Thanks for the plugin. When i click on Signin with Google buttton, it takes to the google page, when the user enters credentials and allow access to the application. Everything happens fine. But, the profile data is not being sent by google. Is there any settings that i miss?
It always enter the else loop in the above code. I really appreciate your help
The text was updated successfully, but these errors were encountered: