question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LaravelJWT error with ExpiredAuthSessionError: Both token and refresh token have expired. Your request was aborted.

See original GitHub issue

@nuxtjs/auth-next”: “5.0.0-1608280312.c5867c3” “nuxt”: “^2.14.12”,

  auth: {
    strategies: {
      laravelJWT: {
        provider: 'laravel/jwt',
        url: '/api/auth',
        endpoints: {
          login: { url: '/api/auth/login', method: 'post' },
          refresh: { url: '/api/auth/refresh', method: 'post' },
          user: { url: '/api/auth/user', method: 'get' },
          logout: { url: '/api/auth/logout', method: 'post' },
        },
        token: {
          property: 'token',
          maxAge: 60 * 60,
        },
        refreshToken: {
          property: 'token',
          maxAge: 20160 * 60,
        },
        user: {
          property: 'user',
        },
      },
    },
  },
  axios: {
    proxy: true,
    credentials: true,
  },
  proxy: {
    '/api': {
      target: process.env.API_URL || process.env.APP_URL,
    },
  },
  router: {
    middleware: ['auth'],
  },
  1. When logged in, then do “logout”, and refresh page got:

    ExpiredAuthSessionError: Both token and refresh token have expired. Your request was aborted. at eval (webpack-internal:///./node_modules/@nuxtjs/auth-next/dist/runtime.mjs:798:17)

  2. clean all cookie from chrome, refresh page got same problem

    ExpiredAuthSessionError: Both token and refresh token have expired. Your request was aborted. at eval (webpack-internal:///./node_modules/@nuxtjs/auth-next/dist/runtime.mjs:798:17)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:30

github_iconTop GitHub Comments

12reactions
NishargShahcommented, Jun 21, 2021

@pi0 Please check again, this problem is still exists in the latest version.

7reactions
qiquanlucommented, Jul 30, 2021

Still facing this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Both token and refresh token have expired. Your request was ...
Im trying to login from my nuxt app to my laravel sanctum back end but when I try to submit my form it...
Read more >
Developers - LaravelJWT error with ExpiredAuthSessionError
LaravelJWT error with ExpiredAuthSessionError: Both token and refresh token have expired. Your request was aborted.
Read more >
Refresh - nuxt auth docs
This time will be used if for some reason we couldn't decode the token to get the expiration date. By default is set...
Read more >
Nuxt Auth - Refresh Token Authentication in Your Nuxt App
This article will cover a complete setup for a Nuxt app that should handle a token refresh scheme. Right now, the auth module...
Read more >
Laravel JWT-Auth: Refresh token on Auto-Pilot - Medium
So let's assume you've built an API, and you need to automate refreshing of tokens. Well Laravel makes this easy without manually keeping ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found