Store token in "session storage" instead of "local storage"


we have the requirement, that a user is logged out when closing a site or tab. We already use custom-authentication-tokens, and it works flawless. The only down side is, that node-red stores the token in local storage, which "overcomes" closing the tab/site. Can we configure the location of token storage to use session storage instead of local storage?


If you are using node-reds persistent context, you can define is as being stored in memory. If you have need for some things to be stored and recovered and some things to ‘go away’ you can define two locations, one in storage and one in memory. Here is a write up about understanding it: A guide to understanding 'Persistent Context'

Hi @mapero

That is not something that is configurable today.

But we do have an issue open to move away from using localStorage entirely and shift to cookies. We will be able to add new config options on the default lifetime of the cookie and whether it should be tied to the browser session or not.

I want to try to get that done for 1.3, but needs to be done with plenty of care. It may end up being something we have to hold back until Node-RED 2.0 in April.

1 Like

Thank you very much. That information helps a lot.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.