GithubHelp home page GithubHelp logo

Comments (3)

asciant avatar asciant commented on May 22, 2024

@atonyba did you have any luck getting this working?

I too have a use case for this too, and came here looking for information on whether it is supported/possible.

from iron-session.

vvo avatar vvo commented on May 22, 2024

@atonyba There's no support currently for going over 4k. I'd say that your best option is not to store token + refresh token in the cookie itself but rather only use the cookie to identify the person (id) and then get the token via a regular API call (on your side, like /user) and cache this route in memory + expiration (if you're dealing with an SPA), or cache it via HTTP headers for like 10 minutes.

The advantage of this is that you can control on your side the data and invalidate it when you want.

PS: Not sure why you're storing tokens inside the cookie itself, is your token used for an external API afterward?

About allowing multiple instances of next-iron-session, that's a good idea but we would have to allow naming the req.session property (like req.session2..) or better: require people to call a method to get the session object instead of extending req.

@asciant can you tell us more about your usecase?

from iron-session.

vvo avatar vvo commented on May 22, 2024

Not in scope of the library

from iron-session.

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.