auth.nuxt.js plugin

This commit is contained in:
les
2019-04-26 23:14:43 +02:00
parent eed3896396
commit 3b80dd5f73
20 changed files with 528 additions and 149 deletions

View File

@@ -21,7 +21,6 @@ const Auth = {
(req.body && req.body.token) ||
req.params.token ||
req.headers.authorization
console.error('sono dentro isAuth ', token, req.headers)
if (!token) return res.status(403).send({ message: 'Token not found' })
jwt.verify(token, config.secret, async (err, decoded) => {
if (err) {