COSC481W-2024Fall / MLite

A user-friendly ML platform that lets non-experts upload datasets, receive model suggestions, schedule training, and deploy models for real-time predictions
0 stars 0 forks source link

Add user Authentication to MLite through Devise #17

Closed Mohammad4844 closed 1 month ago

Mohammad4844 commented 1 month ago

Issue #3

Features

  1. Users can sign up using @emich.edu emails
  2. Users can log in using previously saved credentials
  3. Users can log out

Code

  1. Added Devise Gem for user auth
  2. Add db migration for User model (email & password fields)
  3. Generated views for Devise User
  4. Will only allow signups from @emich.edu emails

See Devise for more details.

Brief Code overview

To test

  1. Pull this branch
  2. rails db:migrate
  3. Restart the server with rails s (it wont work if u don't restart the server)
  4. Go to localhost:3000/users/sign_up and create an account
    • Wont allow signups if its not an emich.edu email OR if password criteria is not met
  5. You'll be logged in
  6. If you try to go back to localhost:3000/users/sign_up, you'll be redirected because you are already logged in
  7. To sign out, type in localhost:3000/users/sign_out
    • Since we don't have any pages right now, we cant add a button sign out. This will do for now.
  8. Go to localhost:3000/users/sign_in and log in using the credentials
  9. You'll be logged in
zsabri91 commented 1 month ago

Great job implementing user authentication with the Devise Gem! The step-by-step instructions are clear, and I liked the emphasis on Eastern's email verification. It's a solid foundation. Looking forward to have the sign out button functionality in the upcoming sprints!