我现在有一个ExpressJS应用程序,它已经启动并运行了PassportJS。我使用Passport使用GitHub进行身份验证。这些是现有的端点。
这将创建授权url并将其重定向到该url:
app.get('/auth/login', passport.authenticate('github'))这将完成获取访问令牌、用户对象和json令牌的所有神奇操作:
app.get('/auth/github/callback', passport.authenticate('github'),
function(req, res) {
res.send(createJWT(req.user));
})如你所见,我只需要两个端点。身份验证/api位于http://localhost:8080/,前端位于http://localhost:3000/
所以我的问题是: Satellizer使用这些现有端点的设置是什么?我应该使用$authProvider.github()还是自定义$authProvider.oauth()提供程序对象?
发布于 2016-07-12 14:18:47
萨特利泽和帕斯波特之间玩得不太好。例如,Satellizer在整个过程中都使用POST请求,而Passport主要依靠GET请求。
没有办法重新配置Satellizer来使用GET请求。
https://stackoverflow.com/questions/36225811
复制相似问题