Closed merkelct closed 7 years ago
Hello @merkelct , can you show us how you are passing the scope values down to our library? I believe it should work like this:
app.use(stormpath.init({
web: {
social:{
google:{
scope: 'openid email profile'
}
}
}
}));
Thanks, Robert
I am just following the example here and do not explicitly set the scopes
https://docs.stormpath.com/nodejs/express/latest/social_login.html#google-login
I tried adding what you have above but still get commas on the scopes it works fine fine if manually remove them from the url
app.use(stormpath.init(app, { web: { social:{ google:{ scope: 'openid email profile' } } }, website: true }));
Can you tell me which version of the express-stormpath module you are using? Thanks.
"express-stormpath": "^3.1.5",
I've identified the bug and the cause. Not sure if I personally have enough experience with this section of the codebase to do a fix, but I'll let @robertjd know and we'll get this fixed!
Hi @merkelct , this is a bug that we need to fix in our library. In the meantime I think you can work around the issue by putting this in your server code:
app.on('stormpath.ready',function () {
app.get('stormpathConfig').web.social.google.scope = 'openid email profile';
});
That should force-overwrite the incorrect settings that we are pulling from our configuration, can you give this a try and let me know if it works for you?
Thanks, I will update this morning and report back if the fix works
FYI just added snippet from above and it worked thanks will keep and eye out for an update
Thanks @merkelct ! We just released the new 3.1.6 version of this library, which should also fi the problem. Could you try upgrading and let us know if this fixes it too?
Update worked thanks guys.
Example
&scope=openid,email,profile
causing