mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14:16 +00:00
return token decoded
This commit is contained in:
parent
e00c96504e
commit
7b33e428ab
@ -10,7 +10,8 @@ export default {
|
||||
|
||||
let result = {
|
||||
expired: false,
|
||||
valid: true
|
||||
valid: true,
|
||||
session: null
|
||||
}
|
||||
|
||||
await jwt.verify(token, global.jwtStrategy.secretOrKey, async (err, decoded) => {
|
||||
@ -42,6 +43,10 @@ export default {
|
||||
}
|
||||
})
|
||||
|
||||
if (result.valid) {
|
||||
result.session = await jwt.decode(token)
|
||||
}
|
||||
|
||||
return res.json(result)
|
||||
},
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user