roopeshsn/freshcomm

User info are saved in local storage which is vulnerable to user

Closed this issue · 10 comments

The user information like email, password, token are saved in local storage which is vulnerable to user privacy. Come up with a solution to address this issue.

userinfo_local_freshbey

@roopeshsn i would like to work on this issue. Can you assign this to me?
My approach is in the backend we need to only send token after login or sign in

So It won't save the credentials in local storage, right?

Yes it won't get stored except jwt.

Can't we store jwt in a cookie?

local storage does the same thing as cookie right?
Just curious, is there any specific reason for storing jwt in cookie?

local storage does the same thing as cookie right? Just curious, is there any specific reason for storing jwt in cookie?

https://coolgk.medium.com/localstorage-vs-cookie-for-jwt-access-token-war-in-short-943fb23239ca

@s-vamshi localStorage can be accessed by the browser but the cookies are 'set and read' only by the backend and client doesn't have any control over it.

@roopeshsn u can assign it to me if @s-vamshi is not available.

@roopeshsn I caught up with some other work so you can assign it to @ozair-dev.

You can work on this issue @ozair-dev!