TLDR: Logging in from either Landing or Login page makes call to back-end
Cleaned up Profile page to reference data from state object
Updated UserSchema to include authId
Logging in with Google from the Landing page calls POST request to the back-end to make a new User object and uses the result from the request to update the redux state with the new User object
Logging in with Google from the SignIn page calls GET request to the back-end to retrieve the User object from the db and uses the result from the request to update the redux state
Logging in with email from the Landing page calls POST request to the back-end to make a new User object and uses the result from the request to update the redux state with the new User object
Logging in with email from the SignIn page calls GET request to the back-end to retrieve the User object from the db and uses the result from the request to update the redux state
Fixed GET User reducers and back-end resolvers
Fixed POST User reducers and back-end resolvers
Does your new code introduce new warnings on dev console?
No
Test Steps
Log in with Google from the Landing page
Open the dev console and check the redux tab, you should see the current user updated in the user state
Open MongoDB Compass (or any other MongoDB UI) and connect to our db
You should see the new User object in our userdatas collection
Sign out
Log in with Google from the Login page
Open the dev console and check the redux tab, you should see the current user updated in the user state
User Story
[IN-69] Nice
Changes made
TLDR: Logging in from either
Landing
orLogin
page makes call to back-endProfile
page to reference data from state objectUserSchema
to includeauthId
Landing
page callsPOST
request to the back-end to make a newUser
object and uses the result from the request to update the redux state with the newUser
objectSignIn
page callsGET
request to the back-end to retrieve theUser
object from the db and uses the result from the request to update the redux stateLanding
page callsPOST
request to the back-end to make a newUser
object and uses the result from the request to update the redux state with the newUser
objectSignIn
page callsGET
request to the back-end to retrieve theUser
object from the db and uses the result from the request to update the redux stateDoes your new code introduce new warnings on dev console?
No
Test Steps
Landing
pageUser
object in ouruserdatas
collectionLogin
page