I am making a small “In house” app and it doesn’t require authentication. However, it does require users to enter their name multiple times throughout the day and I want a simple light solution to fix this. I looked into phx,gen,auth and it seems like overkill.
The approach I am exploring is to simply capture the users first instance of filling out a form and storing their name data in the browser, when they revisit the form they don’t need to re enter it. They just press enter.
In JS accessing local storage and other browser API’s is easy. In phoenix I’ve read that it can be done with hooks but before I go that path, I want to ask:
What ways are developer typically getting access to tools like local storage, indexedDB and cookies from phoenix ?
In my head I imagine that when a user submits a form, the response function captures the input, code runs that communicates with the storage API and stores the data in IndexedDB (or whatever).
In Phoenix, I don’t know if it’s that easy.
Is there a module that I can import with methods that let me store data in IndexedDB (or other browser storage tools) and that I can run in my Phoenix event handler function?