kiro-passport

1.0.6 • Public • Published

This is a beta version !

This module is based on passport authentication system

It generate all passport configuration for use with express

It can be used in complement with the module kiro-rvcgen

Step 1 - run

npm i kiro-passport

Step 2 - require the module in your generator.js

const passportAuthGenerator = require("kiro-passport") ;
passportAuthGenerator()

Step 3 - run the generator

node generator

Step 4 - This will create

  • auth folder in you app with required files
  • auth.js controller file in ./controllers/Auth.js
  • auth.js route in ./routes/auth.js
  • routes-inc.js in ./routes/routes-inc.js

Step 5 - in your express app (or server) add the followin after "const app = express();"

...
const app = express(); //remove this if already decalred
const startPassport = require("./auth/startPassport");
startPassport(app)
...

Step 6 - dont forget to include route in your app

// Routes
const Routes = require("./routes/routes-inc.js");
app.use("/", Routes);

That's it !

Readme

Keywords

none

Package Sidebar

Install

npm i kiro-passport

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

13.4 kB

Total Files

13

Last publish

Collaborators

  • riadkiro