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

User: Hook up user token saving to Redux store, fix typo, stub Device settings #70

Merged
merged 6 commits into from
Sep 27, 2019

Conversation

arghgr
Copy link
Member

@arghgr arghgr commented Sep 16, 2019

Update to #62 and closes #71 . All components that need to check when a user exists on the device can now do so by checking the Redux store.

  • Upon mounting the EventsMap component, checkForUserLogin attempts to fetch user info from async storage on the device and makes sure it's valid, then saves the user token in the Redux store with saveUserToken.
  • In ReporterLoginForm, a login is attempted (upon success, authServices.login saves the returned user info to the async store); if the login is successful and saved to the async store, the user info will be saved to the Redux store.
  • In SettingsPage, after logout (which deletes user info from async storage), deleteUserToken() is called to remove user info from the Redux store.
  • In ChangePassword, a login is attempted with user info fetched from async storage using checkForUserLogin. If the login is successful, the user's password is updated, and another login is attempted. If that works, then the user token is saved to the Redux store.

@arghgr arghgr self-assigned this Sep 19, 2019
@arghgr arghgr added this to In Development in SF Rapid Response MVP: Client via automation Sep 19, 2019
@arghgr arghgr moved this from In Development to Ready for Review in SF Rapid Response MVP: Client Sep 19, 2019
Copy link
Collaborator

@alexgraffeocohen alexgraffeocohen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!! The code got a lot simpler and more uniform, and there are some nice added features in here. A couple comments, but they're so minor that I'm approving anyways.

src/components/EventForm.js Show resolved Hide resolved
src/components/EventForm.js Show resolved Hide resolved
@arghgr arghgr merged commit 026a28d into Cosecha:qa Sep 27, 2019
SF Rapid Response MVP: Client automation moved this from Ready for Review to Ready for Release Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
SF Rapid Response MVP: Client
  
Ready for Release
Development

Successfully merging this pull request may close these issues.

None yet

2 participants