UWCodeForce / student-net

https://uwcodeforce.ca
2 stars 11 forks source link

cookie response & db session storage set up, bug fix #30

Closed Raghuboi closed 2 years ago

Raghuboi commented 2 years ago

fixed bug where an invalid email login lookup returns status code 500 instead of a 401 (email not found in database)

implemented logic through which a successful login returns a cookie with a randomized id, and should insert it into the database provided it has the correct table and schema.

We don't actually do anything with the sessions yet, still have to implement use cases for that.

xTrig commented 2 years ago

If we're pushing schema changes to the main branch, we should make sure that there's a proper migration script inside of config/db/migrations.js.

Ideally if this gets merged, I should be able to pull and startup my server just fine, but you're referencing some tables that don't exist in the current schema for your MySQL session store.

Raghuboi commented 2 years ago

I understand, I have added it in migrations now