-
Notifications
You must be signed in to change notification settings - Fork 34
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
Properly Set up login #118
Comments
@Jooms Why did you cut out the bvrypt compare? The passwords, minus the ones in the dummy data, were being stored and compared as salted hashes. When I wrote the dummy data it was before updating passport.js and I just haven't updated, but all new users created get hashed. The user_id was also already returning as part of the session cookie, and I believe a session token as well. |
Fair question. In order to make sure it does get re-added, I created this (and #119) to track fast-follows that are needed after #101 goes it.
|
This task is now tracking the major task
A frontend and backend dev are needed for this |
Removed redirects for backend login route. Now returns json data including user email. I kept the user data simple I as I unsure what was needed. Any backend routes will be able to pull all user information since we're using sessions. Frontend team will need to specify exactly what user information is needed. |
Backend will now return if the login is a success or failure, forward any authentication error messages, and return user email for on successful logins. More user info can be added later if needed. Route also sets a session cookie that can be used to check all other API routes that require authentication.
* Added structure and example for backend API * Untested commit to change computers * Updated token based authentication * Removed debug code * Fixed rebase issues * Updated use token to check for valid token * address login state issues * Fixed dependany error * removed black test file * fixed linter errors --------- Co-authored-by: Mike Murtey <mike@mikemurtey.com>
During MR #101 where the frontend and backend were being connected a couple of things were disabled in the login functionality.
Reasoning:
/
), and redirect correctly. Right now it just ignores it.FYI: @briswells and @prestonmasseyblake
The text was updated successfully, but these errors were encountered: