Coder Social home page Coder Social logo

amelieoller / has_secure_password_lab-v-000 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from learn-co-students/has_secure_password_lab-v-000

0.0 0.0 0.0 42 KB

License: Other

Ruby 82.11% JavaScript 1.61% CSS 2.10% HTML 13.67% CoffeeScript 0.51%

has_secure_password_lab-v-000's Introduction

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, password, and password confirmation.
  2. A login page, where the user submits their username and password and are logged in.
  3. A user homepage, which says, "Hi, #{username}."

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.

has_secure_password_lab-v-000's People

Contributors

queerviolet avatar blake41 avatar gj avatar mendelb avatar ahimmelstoss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.