crescents-stack / laundry-care

Laundry solution
https://laundrycare.vercel.app
MIT License
1 stars 3 forks source link

[Feature] Remember me in Login #47

Closed musiur closed 9 months ago

musiur commented 9 months ago

Image

sahith29s commented 9 months ago

Should I do with json web tokens?

musiur commented 9 months ago

No, You will need to use the localStorage or sessionStorage in Login pages. At first render in that perticular page you will have to check whether the credentials are already found in (local or session storage) or not. If found than using an useEffect hook with empty dependency array you have to update the formData state. Else do nothing!

Again, If any user tries to use remember me than you will have to add that in the localStorage or sessionStorage for future usage.

😄

musiur commented 9 months ago

You may try to understand this code at first: login.tsx

Still, if there is any issue to understand then just wait a bit to be implemented by me and then you can copy to other pages.

musiur commented 9 months ago

Let me fix this issue. Then you may try for other login pages 😄

musiur commented 9 months ago

@sahith29s You may contribute to other login pages!

Fixes #47