Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #273
Description
So as I suggested a new feature of redux, I implement reducer, the action of only user state because my target is to connect frontend with backend so I focus only on authentication side, we can add more reducer and action in future,
when the user login, we will send back the token in response from the backend,
At frontend side, we create a cookie with the help of js-cookie package,
we will check repeatedly whether the user token expired or not by decoding the token with the help of jwt-decode package and change the state according to the result,
Also, I create a logout button that will remove the cookie from the browser when the user clicks on this button.
There are many things to improve like handle an error with proper UI. but I want suggestion from you guys whether there is something to change or not,
Screenshots
Addition Information (if any)