node.js - Get Google Plus user access_token in Azure webapp server -
i have set azure webapp running node.js express , added google plus authentication using built in azure google "authentication / authorization". auth process works fine using ssl , and able users authenticated.
now, know auth process calling https://mysite.azurewebsites.net/.auth/login/google/callback user access_token future api calls in case azure "intercepts" (instead of happen - on won server).
the question - there why , use token on server?
i have tried add route .auth/login/google/callback , somewho code
router.get('/.auth/login/google/callback', function (req, res, next) { console.log("callback"); next(); });
to no avail...
the auth info google+ set in request headers. if list request headers in router function like: res.send(json.stringify(req.headers));
you can auth info set in headers prefix x-ms-token-google-
.
refer https://azure.microsoft.com/en-us/documentation/articles/app-service-api-authentication/ more details.
meanwhile, can issue /.auth/me endpoint on site retrieving additional user information tokens required graph calls. refer https://azure.microsoft.com/en-us/blog/announcing-app-service-authentication-authorization/ details.
Comments
Post a Comment