Nearly Perpendicular Macaroons

    @mi-sec/passport-geoaxis-oauth

    1.1.0 • Public • Published

    passport-geoaxis-oauth

    GEOAxIS (OAuth 2.0) authentication strategy for Passport.

    NPM

    GEOAxISStrategy tests GEOAxISStrategy lint

    Installation

    npm i @mi-sec/passport-geoaxis-oauth

    Usage

    Basic usage:

    const
    	config   = require( 'config' ),
    	passport = require( 'passport' ),
    	{
    		Strategy: GEOAxISStrategy
    	}        = require( 'passport-geoaxis-oauth' );
    
    const app = express();
    
    passport.use( new GEOAxISStrategy(
        {
            clientID: '',
            clientSecret: '',
            authorizationURL: '',
            tokenURL: '',
            userProfileURL: '',
            scope: '',
            callbackURL: ''
        },
        function( token, refresh, profile, done ) {
            return done( null, { token, refresh, profile } );
        }
    ) );
    
    passport.serializeUser( ( user, done ) => done( null, user ) );
    passport.deserializeUser( ( obj, done ) => done( null, obj ) );
    
    app.use( passport.initialize() );
    app.use( passport.session() );
    

    Install

    npm i @mi-sec/passport-geoaxis-oauth

    DownloadsWeekly Downloads

    4

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    6.08 kB

    Total Files

    4

    Last publish

    Collaborators

    • codebuddha