I am trying to build my first browser extension, In this extension I want users to automatically login if the access key of our website is present in local storage. It is possible to build functionality like that if yes then how?
Asked
Active
Viewed 143 times
-1
Nitesh Ramola
- 1
- 2
-
1How is this different from https://stackoverflow.com/questions/3937000/chrome-extension-accessing-localstorage-in-content-script – Roko C. Buljan Jul 19 '21 at 07:25
-
@RokoC.Buljan the link you shared is about the local storage of extension & I am asking for the local storage of my website – Nitesh Ramola Jul 19 '21 at 13:52
1 Answers
0
Local storage has a different purpose. For login you should use cookies. Why? Cookies are mainly for reading server-side, whereas local storage can only be read by the client-side. Apart from saving data, a big technical difference is the size of data you can store, and as I mentioned earlier, localStorage gives you more to work with.
In conclusion, you cannot use local storage because for login you need a server side readable storage.
André Lademann
- 1
- 1