Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Sign up route clears the state #12

Open
kiitos-smasri opened this issue Mar 25, 2020 · 2 comments
Open

Sign up route clears the state #12

kiitos-smasri opened this issue Mar 25, 2020 · 2 comments

Comments

@kiitos-smasri
Copy link

Hi,
I used this library for aws authentication but the issue appears when i sign in and navigates to sign up page it clears all the auth state and requires sign in again
i think it should redirect me or at least not clearing auth state
provided that signup page is my authComponent

@haolinj
Copy link
Collaborator

haolinj commented Mar 26, 2020

Hi kiitos-smasri, can I please ask how you implemented the SignUp page component?

If you map redux state's state.authState.loggedIn in sign up component to check if it is logged in and then decide if you should redirect or not, this might solve your issue.

Also you can check if your AWS auth tokens are removed from local storage after navigated to sign up page, if they still there, state.authState.loggedIn should stay true.

@kiitos-smasri
Copy link
Author

Thanks for your reply
both solutions are not working because when I navigate to sign up which is the "AuthComponent"
tokens are removed from local storage and state.authState.loggedIn becomes false

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants