Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use redux to handle authentication state #7

Open
batflarrow opened this issue Oct 3, 2021 · 11 comments
Open

Use redux to handle authentication state #7

batflarrow opened this issue Oct 3, 2021 · 11 comments
Assignees
Labels
contribute-a-thon Participating issue in Contribute-a-thon hacktoberfest Participating in Hacktoberfest

Comments

@batflarrow
Copy link
Contributor

No description provided.

@batflarrow batflarrow added contribute-a-thon Participating issue in Contribute-a-thon hacktoberfest Participating in Hacktoberfest labels Oct 3, 2021
@toth2000
Copy link

toth2000 commented Oct 3, 2021

I can look into it.

@batflarrow
Copy link
Contributor Author

I can look into it.

Basically what needs to be done is when a guy logs in i.e. login API is called set the authentication state to true and after this whenever a guy refreshes a api will be called named /authContinuity which will verify if you are logged in or not if the response of this api is not authenticated set the state to false. Don't think about the exact responses you can assume the status codes to be 200 for logged in and 401 for not authenticated. So are you up for it..?

@toth2000
Copy link

toth2000 commented Oct 3, 2021

Okay, so I have to create a Redux store that will hold a boolean value of the login state?.

@batflarrow
Copy link
Contributor Author

Okay, so I have to create a Redux store that will hold a boolean value of the login state?.

Yeah sure a redux store that will be accessible through the application and store the login state.

@raghusodani
Copy link
Contributor

anyone working on this @batflarrow ??

@batflarrow
Copy link
Contributor Author

batflarrow commented Oct 13, 2021

Naah all yours f you are up for it.. @raghusodani

@raghusodani
Copy link
Contributor

ok then assign me

@batflarrow
Copy link
Contributor Author

Go for it @raghusodani

@raghusodani
Copy link
Contributor

there are no login data till now so I am framing a generic reducer to handle username and email.
is it fine?

@batflarrow
Copy link
Contributor Author

there are no login data till now so I am framing a generic reducer to handle username and email. is it fine?

Yeah sure username and email will do just fine and a boolean isAuthenticated so as to maintain the state of auth

@raghusodani
Copy link
Contributor

there are no login data till now so I am framing a generic reducer to handle username and email. is it fine?

Yeah sure username and email will do just fine and a boolean isAuthenticated so as to maintain the state of auth

sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribute-a-thon Participating issue in Contribute-a-thon hacktoberfest Participating in Hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants