cesandoval / PaintingWData

Painting with Data
http://paintingwithdata.com
MIT License
2 stars 0 forks source link

Create user authentication #1

Closed cesandoval closed 8 years ago

cesandoval commented 8 years ago

Create models for users, and the queries to save and authenticate them.

cesandoval commented 8 years ago

Now that the DB is created, resources to create the user can be found: here and here

cesandoval commented 8 years ago

I migrated the DB to Postgres from Mongo. Users can be created, but the login is not working. Additionally, I haven't been able to install bcrypt to encrypt the user info, due to bcrypt windows compatibility issues.

cesandoval commented 8 years ago

Update: The signup view is not saving any users in the DB. Potentially might have to do with this.

Since users are not being saved in the DB, it is not possible to authenticate them.

EDIT: The DB was being rewritten every time the code ran because the model sync was forced.

Apparently I fixed the signup issues and now we should handle the successful login. Maybe redirect to the index page, but being authenticated. A good place to handle all of that might be here.

We have to also figure out how to hash the password and username. I was trying this, but am having troubles installing the libraries on windows.

If all seems to work we can move to #3 .

Tariq60 commented 8 years ago

Hashing added to signup Controller and seems to work. Kindly check and confirm. If so, maybe we can close this issue

cesandoval commented 8 years ago

Added async to the password hashing, and changed the models to accept more bits per column. Modified the login controller to use the hashing verify function.