Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

actionhero-oauth2-client

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

actionhero-oauth2-client

ActionHero OAuth2 Client

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

actionhero OAuth2 client

Create a OAuth2 client with actionhero

Install:

npm install actionhero-oauth2-client

create a new initializer inside your actionhero project.

e.g. oauth2.js with the following content

var OAuth2Client = require('actionhero-oauth2-client');

var client = new OAuth2Client({
  id: 'your_oauth_client_id',
  secret: 'your_oauth_secret',

  site: 'http://your_oauth2_server.com'
});

client.on('authorized', function(api, connection, next){
  var access_token = connection.params.access_token;
  //save the access token here
  next(connection, true);
});

client.on('unauthorized', function(api, connection, next){
  //authorization failed
  next(connection, true);
})

exports.oauth = client.initializer;

call api.oauth2.redirectToLogin(connection); to redirect your user to the OAuth2 server

Keywords

FAQs

Package last updated on 16 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc