auth-module
auth-module copied to clipboard
Multiple Token Refresh
Hello! We have a nuxt project on one domain domen.com and api on another domain api.domen.com. We use nuxt auth jwt. On the api-tymondesigns/jwt-auth side. Everything works fine, but on the same device, several refresh requests are made during authorization. After that, when working on the site, an error 401 due to an expired token (blacklist).
nuxt.config.js
auth: { redirect: { login: '/auth', logout: '/auth', }, cookie: { options: { sameSite: 'lax', }, }, strategies: { 'laravelJWT': { provider: 'laravel/jwt', scheme: 'refresh', url: '/auth', endpoints: { login: { url: '/login', method: 'post' }, logout: { url: '/logout', method: 'post' }, refresh: { url: '/refresh', method: 'post' }, //на время отключил user: { url: '/me', method: 'get' } }, token: { property: 'access_token', global: true, }, refreshToken: { property: 'access_token', data: 'access_token', tokenRequired: true } }, } }
Please help as I can't figure it out myself. "@nuxtjs/auth-next": "^5.0.0-1643791578.532b3d6", "@nuxtjs/axios": "^5.13.6",
Having the same issue here. Could solve it using the solutions found on the web.