nuxt.js - Nuxt Auth 策略不获取身份验证令牌
问题描述
我有以下身份验证策略:
auth: {
strategies: {
local: {
...,
},
google: {
clientId:
"<MY CLIENT ID>",
responseType: "code",
endpoints: {
token: "http://localhost:8000/social-login/google/",
userInfo: "http://localhost:8000/auth/user/",
},
},
},
redirect: {
...
},
},
奇怪的是,这个策略自己完成了所有的身份验证,而不需要访问我的后端!responseType 不应该code
去endpoints.token
获取令牌吗?
我的登录功能如下所示:
loginWithGoogle() {
this.$auth.loginWith("google", {
params: {
client_id:
"<MY CLIENT ID>",
},
});
},
有趣的是,如果我没有在这里传递参数,谷歌会给我一个client_id
缺失的错误。
解决方案
推荐阅读
- openstreetmap - 在立交桥中如何查询步行距离在1小时到2小时之间的某一类型的所有点?
- spring-boot - 在 Spring Boot Apache Camel REST API 中配置 HTTPS,密钥库使用 camel-jetty 组件具有多个证书
- reactjs - Nginx 配置以在登录和注销时将 myserver.com 重定向到 Tableau tabserver.com
- php - 使用 file_get_contents() [PHP] 检查文件是否不存在或为空的推荐方法是什么?
- r - 如何在闪亮的 SelectInput 上添加参数“All”?
- azure - 如何通过 Graph Api 或类似方法获取所有团队 Calls&Meetings 的通话质量?
- java - 当前程序具有捆绑的 jre 时如何运行另一个 .jar 文件?
- html - 如何更改 CSS 颜色以匹配引导主题
- c++ - 直接将数组作为输入的一部分
- godot - 戈多不会产生粒子