Skip to content

Instantly share code, notes, and snippets.

View mdjacksparrow's full-sized avatar
💭
I may be slow to respond.

Mohamed Jakkariya R mdjacksparrow

💭
I may be slow to respond.
  • Tamilnadu
View GitHub Profile
@mdjacksparrow
mdjacksparrow / passport.js
Created March 20, 2020 05:37 — forked from manjeshpv/passport.js
Passport.js using MySQL for Authentication with Express
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@manjeshpv
manjeshpv / passport.js
Last active July 5, 2025 14:15
Passport.js using MySQL for Authentication with Express
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@joshbirk
joshbirk / samplerest.js
Created February 3, 2012 19:57
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')