[New FREE plugin] Session & Local Storage (web storage API)

I would like it to be documented how to apply through examples.

3 Likes

Hey @Benji - thanks again for this plugin. I am playing around with it now.

Can you please set it up so that we can enter a static value (such as “2” or “yes”).

An example use case might be:
set localStorage darkmode = “yes”

2 Likes

hi!

This is already possible as you can set the local storage to dynamic values, you can include a static value.

You can read more on how here [RESOLVED] Dynamic AND static text in a box

KR

Ben

Is it secure to store API tokens in your plugin’s Local Storage? How about XSS?

@Benji are you less secure than setting up Local Storage manually using Javascript and Toolbox plugin?

It seems that your feature “Do Get Webstorage A” does not work, when “state” = “any state not default webstorage A’s value”:

1e 2dr2e
It works when I use default webstorage A’s value, but I can’t use it, because webstorage A’s [state] is not a list, I have 2 pair of values that I need to save in LocalStorage, so it is impossible for me to use that.

I hope it is not a bug, please, provide an explanation.

2 Likes

The Same Occurring here with me. any solution to this problem?

1 Like

I’ve used several WebStorages (1 webstorage for 1 value) and then when it was a time to use that value, then I used ‘:find & replace’ to delete the quotes.

1 Like

Please do not understand the purpose and functionality of this plugin yet.
Could someone explain to me in a more simple and practical way?

thankful

Silvio GregĂłrio

I cannot, for the life of me, figure out how to retrieve the data stored in a session.

Is there any sort of tutorial instructions or video that I could take a look at?

Ken

I have the same problem as @ken2 . I have installed the plugin but I cannot not see the workflow actions under element actions in my app.
image

1 Like

Hey, I’m using the Local Storage option for an API token also. I’m finding that when I close the browser and re-open it, the Local Storage wipes and doesn’t save the value. Doesn’t this defeat the purpose of Local Storage. I might as well be using Session storage. Wondering if you’re experiencing anything similar?

@Benji any thoughts on this?

Jacob

I am getting this error when trying to clear web storage::

Shared with CloudApp
Shared with CloudApp

1 Like

i have the same problem as @mghatiya . i read all the blog but i figured out that no one has answered of this problem.
so please can some one told as why we didn’t get the actions of this plugin while we installed it
actions

1 Like

Same issue here

image

1 Like

So, I take it folks would like a plugin for localStorage and sessionStorage that actually works? And that supports Things as well as primitive data types and Lists as well as scalars?

What’s it worth to you?

4 Likes

Working on an actually useful localStorage plugin and read this plugin’s code just for yuks. It’s incredibly naïve and primitive.

It doesn’t know how to handle Things nor does it understand Lists (which we already know from comments above), but also only outputs the retrieved key value as text without JSON.parsing it. (The main interface has no type selector field so that’s all it could ever do. localStorage/sessionStorage can only hold strings (JSON.stringify’ed values), but of course we can restore them to their actual data types by parsing them properly.)

So, for the typical Bubbler, this plugin is less than useless.

2 Likes

Oh man, I just don’t see any graceful type-safe way of implementing this amount of polymorphism…even if client side actions could produce outputs. That’s not a complaint. I totally get how Bubble’s client side asynchronous implementation means client side actions cannot produce results.

In general the whole “interrogate an unknown thing to figure out what type to expect” seems to be some CS theoretical last bastion of human necessity. While everything else falls to the gods of AI, we all still seem to be writing a lot of code along the lines of “when X is run expect a result of type Y”

I saw from another comment, @aaronsheldon, that you don’t think Bubble is strongly-typed. But it is.

In plugins, to use an output (and make its type dynamic)m we use the “App Type” editor selection type, like so:

And now, in setting up an Exposed State (what I call an “output” because it’s easier to say/type/and understand), we can say:

See?

I was being facetious.