Closed AsiaOsman06 closed 2 weeks ago
Woof. This was a lot!
We found out that the passport.use('local')
bit NEEDS to receive username
and password
in req.body
.
So, we modified the user
table to have a username
column (rather than email
), then modified the login Saga:
const loginObject = {
username: action.payload.email,
password: action.payload.password
}
// send the action.payload as the body
// the config includes credentials which
// allow the server session to recognize the user
console.log('loginObject in login sagaa', loginObject)
yield axios.post('/api/user/login', loginObject, config);
Description
Your Real Name
Asia Osman
What do you want to happen? Login What is actually happening?
Screenshots / Code Snippets
What did you try? Who did you ask?
debug with lisa
What branch is your code on? Did you git push?
https://github.com/nest8financial/nest8
When was the last time you took a break?
Lunch Break