Passport-Maltio
Passport strategies for authenticating with Malt.io using OAuth 2.0.
This module lets you authenticate using Malt.io in your Node.js applications. By plugging into Passport, Malt.io authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.
Install
$ npm install passport-maltio
Usage
Configure Strategy
The Malt.io OAuth 2.0 authentication strategy authenticates users using a Malt.io
account and OAuth 2.0 tokens. The strategy requires a verify
callback, which
accepts these credentials and calls done
providing a user, as well as
options
specifying a client ID, client secret, and callback URL.
var MaltioStrategy = ; passport;
Authenticate Requests
Use passport.authenticate()
, specifying the 'maltio'
strategy, to
authenticate requests.
For example, as route middleware in an Express application:
app; app;
Now, to log in a user
Examples
For a complete, working example, refer to the example directory.
Credits
- Daniel G. Taylor
- Heavily based on examples by Jared Hanson
License
Copyright (c) 2013 Daniel G. Taylor