Passport-SteemConnect
A SteemConnect authentication strategy for Passport.
This module lets you authenticate using SteemConnect in your Node.js applications. By plugging into Passport, SteemConnect authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express and NextAuth
Install
$ npm i passport-steemconnect --save
Usage
Configure Strategy
The SteemConnect authentication strategy authenticates users using a third-party
account and OAuth 2.0 tokens. The User uses The Standard OAuth 2.0 endpoints for SteemConnect, as well as
the client identifer and secret, are specified as options. The strategy
requires a verify
callback, which receives an access token and profile,
and calls cb
providing a user.
* Options: * * - `authorizationURL` URL used to obtain an authorization grant * - `tokenURL` URL used to obtain an access token * - `clientID` identifies client to service provider * - `clientSecret` secret used to establish ownership of the client identifer * - `callbackURL` URL to which the service provider will redirect the user after obtaining authorization * - `passReqToCallback` when `true` `req` is the first argument to the verify * - `scope` 'vote''comment''offline' * * * Examples: * * passport;
Authenticate Requests
Use passport.authenticate()
, specifying the 'steemconnect'
strategy, to
authenticate requests.
For example, as route middleware in an Express application:
app; app;
Related Modules
- passport-google-oauth2 Google (OAuth 2.0) authentication strategy for Passport and Node.js.
- passport-oauth1 — OAuth 1.0 authentication strategy
- passport-http-bearer — Bearer token authentication strategy for APIs
- OAuth2orize — OAuth 2.0 authorization server toolkit
License
Copyright (c) 2018 Sean Warren http://doyoubelieve.me/