[英]How to pass the access_token as directly to the nuxt/auth package
How to pass access_token
to the user
endpoint in nuxt/auth
package while you got the access_token as directly without any username and password, I don't want to call login
before the user
endpoint because of access_token is already and I just want to call user enpoint, finally how do i pass access_token
and call the user
endpoint directly? 如何在没有任何用户名和密码的情况下直接将access_token传递给
nuxt/auth
包中的access_token
到user
端点,我不想在user
端点之前调用login
,因为access_token已经存在,我只想调用user请问,最后我该如何传递access_token
并直接调用user
端点? Thanks so much for any help! 非常感谢您的帮助!
// Auth module
auth: {
plugins: [
{ src: '~/plugins/auth' }
],
redirect: {
login: '/login',
logout: '/',
home: false
},
strategies: {
local: {
endpoints: {
login: { url: 'account/token', propertyName: 'result.access_token' },
logout: { url: 'account/logout' },
user: { url: 'account/self', propertyName: 'result' }
}
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.