Giter Club home page Giter Club logo

easy-passport-local-sequelize-express4-sample's Introduction

Welcome to easy-passport-local-sequelize-express4-sample (DEPRECATED)

In the absence of complete sample, here you have a very very very easy example authentication system. This sample is DEPRECATED.

Please take a look here https://github.com/ggoral/try-passport-with-sequelize

Installation

  1. Clone the repo: git clone [email protected]:ggoral/easy-passport-local-sequelize-express4-sample.git
  2. Change directory: cd easy-passport-local-sequelize-express4-sample
  3. Install dependencies: npm install
  4. Change your database settings in config/config.json
  5. Migrate your database: npm run migrate
  6. Start your server: npm start
  7. View your app in browser.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Thanks to:

https://github.com/mjhea0/passport-local-express4

https://github.com/madhurjain/passport-local-sequelize

https://scotch.io/tutorials/easy-node-authentication-linking-all-accounts-together

easy-passport-local-sequelize-express4-sample's People

Contributors

ggoral avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

easy-passport-local-sequelize-express4-sample's Issues

Migration file creates a hash column of 255, longer than what it actually needs

Hello, thanks a lot for the sample, it really helped me understanding more of the combination between sequelize, passport and express. I've got it to work using sqlite but not with postgresql.

After a while i found out that the hash consists of 1024 character while the migration file (using hash: Sequelize.STRING) creates a VARCHAR(255) column. After changing this to 1050 (a bit more than 1024 just to be safe) it worked. Apparently it's possible to pass a parameter along for the length of the string (hash: Sequelize.STRING(1050)) but i haven't tried this. I just wanted to write this here so others could read up about it in case they have the same problem.

Thank you,

Ringo

App doesn't auth correctly when using MySQL in development

If I change config.json to look something like:

  "development": {
    "username": "user",
    "password": "pass",
    "database": "testdb",
    "host":     "127.0.0.1",
    "dialect":  "mysql"
  },

All attempts to authenticate a user fail, I get a 401 back from all auth requests.

I was writing my own app and experienced this, so cloned this repo to try it out, and saw exactly the same behaviour. Using sqlite works in both my app and this one.

To reproduce:

  • clone the repo
  • install mysql server and npm install mysql
  • follow the instructions in the README to set up the app
  • create the database to match the JSON snippet above
  • register a user (appears to work fine) and attempt to log in

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.