Code Monkey home page Code Monkey logo

node-jwt-auth's People

Contributors

benjaminewhite avatar cklanac avatar oampo avatar peasofmind avatar tsongas avatar

Stargazers

 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  avatar  avatar

node-jwt-auth's Issues

Basic authentication issue (convert to another process?)

@oampo @benjaminEwhite,

The dialog box used by basic authentication pops up when incorrect UN/PW submission.

The issue can be fixed by adding failWithError: true to the middleware as follows

const basicAuth = passport.authenticate('basic', { session: false, failWithError: true  });

This allows us to remove the www-authenticate header before sending the response which suppresses the built-in dialog.

app.use(function (err, req, res, next) {
  res.removeHeader('www-authenticate');
  next(err);
});

explain expect.fail

I'm having an issue understanding the test. When running the test expect.fail always fails the test. Can you give some insight into how expect.fail works?

How is .env being read?

@benjaminEwhite @oampo
Noticed in the lesson it says you'll need to create .env file for the JWT_SECRET etc. but I'm not seeing how this will be read. Don't you need the dot-env package or similar?

Unable to access req.user server side

Tried several things, how do I get access to req.user on the server side once logged in?
Trying to save data to database with a user id attached to it, but can't get the user id.

Unhandled rejected promise

When a student deployed this code to Heroku and an error (bad database URL) occurred in runServer(), he got an unhandled rejected promise error from Node instead of a meaningful error message.

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.