Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to renew/extend token session for Auth0 #858

Closed
dbeja opened this issue Oct 22, 2020 · 1 comment
Closed

Unable to renew/extend token session for Auth0 #858

dbeja opened this issue Oct 22, 2020 · 1 comment

Comments

@dbeja
Copy link

dbeja commented Oct 22, 2020

Version

v4.9.1

Reproduction link

https://jsfiddle.net/

Steps to reproduce

I'm using auth-module on a Nuxt.js app to have Auth0 as the authentication system.
It's working great but I want to extend the expiration of the user session so that he doesn't have to login every day.

It seems to work fine for a couple of hours, but on the following day, he has to login again.
I tried to setup the cookie configuration of auth-module to expire after 30 days but it seems to not affect this, probably because I need to do something to renew the Auth0 token.

This is my configuration on nuxt.config.js:

  auth: {
    plugins: ['~/plugins/auth0.js'],
    redirect: {
      login: '/auth/login',
      callback: '/auth/signed-in'
    },
    fullPathRedirect: true,
    cookie: {
      options: {
        expires: 30
      }
    },
    strategies: {
      local: false,
      auth0: {
        domain: 'XXXXXXX',
        client_id: 'XXXXXXXXXXXXXXXXX,
        expires_in: 30000
      }
    }
  },

Is there any way to renew Auth0 token?

What is expected ?

Ideally, for expires or expires_in options to work with Auth0.

What is actually happening?

Auth0 session seems to expire in less than one day and I don't see a way to renew the token without forcing the user to login again.

This bug report is available on Nuxt community (#c686)
@JoaoPedroAS51
Copy link
Collaborator

Hi @dbeja! Refresh token support has been added in v5. We now recommend using v5 instead of v4. See status and #893

Docs can be found here: https://auth.nuxtjs.org/providers/auth0 and https://auth.nuxtjs.org/schemes/oauth2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants