Git Product home page Git Product logo

Comments (6)

madsh93 avatar madsh93 commented on August 25, 2024 5

Hi @BracketJohn

I've managed to get it working. I am currently testing it. But everythings seems to be working. I do however, have a bunch of TS errors.

Here's my updated Gist.
https://gist.github.com/madsh93/b573b3d8f070e62eaebc5c53ae34e2cc

from nuxt-auth.

BracketJohn avatar BracketJohn commented on August 25, 2024

Hey @madsh93!

Thanks for the q + the gist, that's already super helpful. Hopefully we can get it to work and then we can add an example of it to the docs (:

I am having troubles with refresh tokens.

can you describe what the issue is with the refresh tokens in your setup?

from nuxt-auth.

BracketJohn avatar BracketJohn commented on August 25, 2024

Wow, great work, thanks! 💯

I think we can actually add two pieces of documentation based on this gist:

  • example: how to use nuxt-auth + directus (see #44 for another, similar PR)
  • example: how to add a token refresh hook (this would be new "callbacks" sub-section at the end of "Server-side usage" with a general intro to callbacks and then one sub-section of using the jwt callback to refresh sessions)

You wouldn't want to work on one of those by coincidence? :D

from nuxt-auth.

BracketJohn avatar BracketJohn commented on August 25, 2024

Closing this issue now - question was answered + the documentation that is going to merged soon will even contain the directus example as a recipe (see #90)

from nuxt-auth.

vanling avatar vanling commented on August 25, 2024

@madsh93 I keep getting a 401 Unauthorized on every second refreshAccessToken() the first one works great, but its not updating the refreshToken in the JWT, so in the second call it's using the token that was provided during signin and initial creation of the JWT.

EDIT: temp fix from #200 works 🎉

from nuxt-auth.

BracketJohn avatar BracketJohn commented on August 25, 2024

Good to hear -> let's get #200 closed for everybody then 🎊

from nuxt-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.