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

@octokit/oauth-app

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/oauth-app

GitHub OAuth toolset for Node.js

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
680K
increased by1.33%
Maintainers
3
Weekly downloads
 
Created

What is @octokit/oauth-app?

@octokit/oauth-app is a Node.js library that simplifies the process of implementing GitHub OAuth applications. It provides a set of tools to handle OAuth flows, manage tokens, and interact with GitHub's API securely.

What are @octokit/oauth-app's main functionalities?

OAuth App Initialization

This feature allows you to initialize an OAuth application with your GitHub client ID and client secret.

const { OAuthApp } = require('@octokit/oauth-app');

const app = new OAuthApp({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret'
});

Handling OAuth Web Flow

This feature allows you to handle the OAuth web flow, including exchanging the authorization code for an access token and using the token to authenticate API requests.

app.on('oauth', async ({ token, octokit }) => {
  const { data: { login } } = await octokit.request('GET /user');
  console.log('Authenticated as', login);
});

Token Management

This feature allows you to manage tokens, including creating, refreshing, and revoking tokens.

app.on('token', async ({ token }) => {
  console.log('New token created:', token);
});

Other packages similar to @octokit/oauth-app

Keywords

FAQs

Package last updated on 25 Feb 2020

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