Skip to content

nataliagalan/has_secure_password_lab-chi01-seng-ft-080320

This branch is 1 commit ahead of learn-co-students/has_secure_password_lab-chi01-seng-ft-080320:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

44ef059 · Sep 4, 2020

History

48 Commits
Sep 4, 2020
Feb 13, 2019
Sep 4, 2020
Sep 4, 2020
Dec 10, 2015
Dec 10, 2015
Dec 10, 2015
Feb 25, 2019
Dec 10, 2015
Sep 4, 2020
Mar 7, 2019
Jun 28, 2017
Feb 25, 2019
Jun 28, 2017
Sep 4, 2020
Sep 4, 2020
Jun 28, 2017
Jun 15, 2020
Dec 10, 2015
Dec 10, 2015

Repository files navigation

has_secure_password

Objectives

We're going to make a Rails app that covers a simple authentication flow: users can create accounts, log in, and log out.

Introduction

Our app has three pages:

  1. A signup page, where the user enters their username (as name), password, and password confirmation.
  2. A login page, where the user submits their username (as name) and password and are then logged in.
  3. A user homepage, which says, "Hi, #{name}."

We're not covering validations in this lab, so don't worry about those. (Password validations are hard to get right anyway; it's surprisingly easy to produce rules which decrease password security rather than enhance it.)

Users should not be able to log in if they enter an incorrect password. Just redirect them back to the login page. If you want to present an error, you can either return an HTTP error from the controller and catch it with Javascript, or set a flash.

Instructions

  1. Create a User model and migrations.

  2. Create a Users controller. It should respond to new with the signup form, and respond to create by creating a new user.

  3. Create a Sessions controller and the appropriate actions.

  4. Create a user homepage. You can either create a controller for it (a WelcomeController is a reasonable thing that you'll see frequently), or you can make it an action in the User's controller.

Happy coding.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 83.8%
  • HTML 13.1%
  • CSS 1.6%
  • JavaScript 1.5%