Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
feat(login): resetBeforeLogin option to enable/disable resetting of auth and profile on login #254
I feel the logic of 4th action is not quite right.
To replicate this issue, you can try to run
LOGIN_ERROR is run with
For now, it would probably be best to check for auth before you re-run
It seems like we could make a different action that only clears the error, but does not empty the rest of the auth state.
@prescottprue Unfortunately, in this case, no. Removing auth redirects the user away from the settings page because they are briefly no longer logged in. Also, the user data doesn't change, though it's true that the auth token will be refreshed and likely different.
I think I solved the issue on my end by using a login popup when someone is accessing a page behind a login wall, but others might still have this issue. I think firebase has a special re-login flow, but I didn't look into it too much. Maybe we can expose that through react-redux-firebase.