Git Product home page Git Product logo

token-based-auth-backend's Introduction

token-based-auth-backend

Token Based Authentication Backend Project Written in NodeJS

token-based-auth-backend's People

Contributors

alejandropaciotti avatar huseyinbabal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

token-based-auth-backend's Issues

JSON Web Token

Isn't the idea to sign the web token dynamically and not store it in the database?

Error TypeError: secret must be a string or buffer

/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/mongoose/lib/utils.js:413
throw err;
^
TypeError: secret must be a string or buffer
at typeError (/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/index
js:12:10)
at Object.sign (/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/jsonwebtoken/node_modules/jws/node_modules/jwa/ind
x.js:28:13)
at Object.jwsSign [as sign](/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/jsonwebtoken/node_modules/jws/index.j
:34:26)
at Object.module.exports.sign (/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/jsonwebtoken/index.js:28:20)
at Promise. (/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/api/routes.js:74:24)
at Promise. (/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/mongoose/node_modules/mpromise/lib/promise
js:177:8)
at Promise.EventEmitter.emit (events.js:98:17)
at Promise.emit (/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:
8)
at Promise.fulfill (/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/mongoose/node_modules/mpromise/lib/promise.js:
7:20)
at handleSave (/var/lib/openshift/557e86cd5004461739000119/app-root/runtime/repo/node_modules/mongoose/lib/model.js:133:13)

Token Expiration

Hi, I'm looking at borrowing some ideas from this for a project that will use AngularJS, NodeJS and Express. And requires the ability to track users being logged in (hence looking at this project).

However I haven't seen anywhere in the code where you handle the expiration of the token and request that the user re-login to generate a new token. Have I missed this?

Hidden fields in RockMongo

Someboy knows why I can´t see the user and password fields using RockMongo in spite of the findone method already find the user.

Thanks

uncaghtException 'iat' of undefined

hi,I pull project, step to sign up, get this error

OPTIONS /signin 200 14.514 ms - 4
/Users/someuser/projects/token-based-auth-backend/node_modules/mongoose/lib/utils.js:413
        throw err;
              ^
TypeError: Cannot set property 'iat' of undefined
    at Object.module.exports.sign (/Users/someuser/projects/token-based-auth-backend/node_modules/jsonwebtoken/index.js:12:15)

is mongodb schema define error ?

erro to sigin

OPTIONS /signin 200 0.413 ms - 4
[TypeError: Cannot set property 'iat' of undefined]
POST /signin - - ms - -
[TypeError: Cannot set property 'iat' of undefined]
POST /signin - - ms - -
OPTIONS /signin 200 0.617 ms - 4
[TypeError: Cannot set property 'iat' of undefined]
POST /signin - - ms - -
[TypeError: Cannot set property 'iat' of undefined]
POST /signin - - ms - -

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.