-
Notifications
You must be signed in to change notification settings - Fork 1
set up the authentication part #16
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
base: master
Are you sure you want to change the base?
Conversation
|
Where's the user story for this? You've linked it to the user journey. |
|
Also, this needs to be reviewed by your teammates first so removing assignment for me and Mario for now. |
SamiSha99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for me, I don't see any issues to comment on.
ionush
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool
| res.writeHead(200, {"Content-Type": "text/html"}); | ||
| res.end("Invalid username or password"); | ||
| } else { | ||
| var cookie = jwt.sign(JSON.stringify(result), process.env.SECRET); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why var and not const?
| text-decoration: none; | ||
| color: #fff; | ||
| } | ||
| font-family: Roboto; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a fallback font if the user doesn't have this font
| </LandingNavbar> | ||
|
|
||
| <SignupDiv> | ||
| <form className="form-3" action='/api/newUser' method='POST'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of a classname is this? form-3 tells me nothing...
src/js/Login.jsx
Outdated
| return (<div> | ||
|
|
||
| <LoginDiv> | ||
| <form onSubmit={this.handleSubmit} action="/api/login" method="POST" className="form-3"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this classname???
| if (err) { | ||
| cb(err); | ||
| } else { | ||
| // console.log('post.rows:', post.rows); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get rid of this commented out code
| if(err){ | ||
| return cb(err) | ||
| } | ||
| if(res.rows.length==0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not triple equals?
relates #6 , set up the authentication , and a routing for the userPage