Giter Club home page Giter Club logo

login_songs's Introduction

Registration and Authentication

  • Indentity

    Uniquely indentifies a user. Could be a username, email, api key, etc.

  • Credentials

    Used to authenticate a user. Could be a password, pin, public key, encrypted hash.

  • Registration/Signup

    User identity is created with their credentials, email and password in this case.

  • Authentication/Login

    User is authenticated using their identity and credentials.

Passwords

Do not want to store the "plain text" passwords in the DB. Just in case the system is comprimised, cracked.

We only stored hashed passwords. Never store plain text passwords!! So that if a malicious user gains access then they cannot obtain passwords. We're going to use the bcrypt gem to hash plain text passwords into a crypto hash. This will done by using this gem's hash_secret method.

BCrypt is just one of many types of ways to generate a hash.

The general workflow for account registration and authentication in a hash-based account system is as follows:

1) The password is hashed and stored in the database. At no point is the plain-text (unencrypted) password ever written to the hard drive.
2) When the user attempts to login, the hash of the password they entered is checked against the hash of their real password (retrieved from the database).
3) If the hashes match, the user is granted access. If not, the user is told they entered invalid login credentials.

Steps 3 and 4 repeat everytime someone tries to login to their account.

Need to a use a salt to generate crypto hashes.

This will prevent common ways of cracking a hash. A salt is a random string that makes it more difficult to crack the hash. This salt is feed into the hash algorithim along with the plain text password to produce a cryptographic hash.

Links

See the steps.txt file for instructions.

login_songs's People

Contributors

tdyer avatar

Watchers

James Cloos 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.