Skip to content

Instantly share code, notes, and snippets.

View noris666's full-sized avatar

Georgiy Trokovets noris666

  • Adaptive Group
  • Kazakhstan, Astana
View GitHub Profile
@vesse
vesse / express-jwt.js
Last active October 3, 2024 10:52
Two Passport + JWT (JSON Web Token) examples
//
// Implementation using express-jwt middle
//
var express = require('express'),
ejwt = require('express-jwt'),
jwt = require('jsonwebtoken'),
passport = require('passport'),
bodyParser = require('body-parser'),
LocalStrategy = require('passport-local').Strategy,
BearerStrategy = require('passport-http-bearer').Strategy;