Token Based Authentication Backend Project Written in NodeJS
huseyinbabal / token-based-auth-backend Goto Github PK
View Code? Open in Web Editor NEWToken Based Authentication Backend Project Written in NodeJS
Token Based Authentication Backend Project Written in NodeJS
/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)
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 - -
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
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 ?
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?
Isn't the idea to sign the web token dynamically and not store it in the database?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.