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

@octokit/auth-app

Package Overview
Dependencies
Maintainers
2
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/auth-app - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

7

dist-node/index.js

@@ -9,2 +9,3 @@ 'use strict';

var request = require('@octokit/request');
var deprecation = require('deprecation');
var universalGithubAppJwt = require('universal-github-app-jwt');

@@ -341,2 +342,6 @@ var LRU = _interopDefault(require('lru-cache'));

case "oauth":
state.log.warn( // @ts-expect-error
new deprecation.Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`));
case "oauth-user":
return getOAuthAuthentication(state, options);

@@ -469,3 +474,3 @@

const VERSION = "3.0.0";
const VERSION = "3.1.0";

@@ -472,0 +477,0 @@ const createAppAuth = function createAppAuth(options) {

@@ -0,1 +1,2 @@

import { Deprecation } from "deprecation";
import { getAppAuthentication } from "./get-app-authentication";

@@ -12,2 +13,6 @@ import { getInstallationAuthentication } from "./get-installation-authentication";

case "oauth":
state.log.warn(
// @ts-expect-error
new Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`));
case "oauth-user":
return getOAuthAuthentication(state, options);

@@ -14,0 +19,0 @@ default:

2

dist-src/version.js

@@ -1,1 +0,1 @@

export const VERSION = "3.0.0";
export const VERSION = "3.1.0";

@@ -94,3 +94,3 @@ import * as OctokitTypes from "@octokit/types";

export declare type AuthOptions = InstallationAuthOptions & OAuthOptions & {
type: "app" | "installation" | "oauth";
type: "app" | "installation" | "oauth" | "oauth-user";
};

@@ -97,0 +97,0 @@ export declare type WithInstallationId = {

@@ -1,1 +0,1 @@

export declare const VERSION = "3.0.0";
export declare const VERSION = "3.1.0";
import { getUserAgent } from 'universal-user-agent';
import { request } from '@octokit/request';
import { Deprecation } from 'deprecation';
import { githubAppJwt } from 'universal-github-app-jwt';

@@ -207,2 +208,6 @@ import LRU from 'lru-cache';

case "oauth":
state.log.warn(
// @ts-expect-error
new Deprecation(`[@octokit/auth-app] {type: "oauth"} is deprecated. Use {type: "oauth-app"} instead`));
case "oauth-user":
return getOAuthAuthentication(state, options);

@@ -337,3 +342,3 @@ default:

const VERSION = "3.0.0";
const VERSION = "3.1.0";

@@ -340,0 +345,0 @@ const createAppAuth = function createAppAuth(options) {

{
"name": "@octokit/auth-app",
"description": "GitHub App authentication for JavaScript",
"version": "3.0.0",
"version": "3.1.0",
"license": "MIT",

@@ -18,7 +18,3 @@ "files": [

],
"homepage": "https://github.com/octokit/auth-app.js#readme",
"bugs": {
"url": "https://github.com/octokit/auth-app.js/issues"
},
"repository": "https://github.com/octokit/auth-app.js",
"repository": "github:octokit/auth-app.js",
"dependencies": {

@@ -25,0 +21,0 @@ "@octokit/request": "^5.4.11",

@@ -43,2 +43,8 @@ # auth-app.js

⚠️ The private keys provided by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You need to convert it first:
```shell
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key
```
</td></tr>

@@ -57,13 +63,2 @@ <tr><th>

</td></tr>
<tr><td colspan=2>
⚠️ For usage in browsers: The private keys provided by GitHub are in `PKCS#1` format, but the WebCrypto API only supports `PKCS#8`. You need to convert it first:
```shell
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key
```
No conversation is needed in Node, both `PKCS#1` and `PKCS#8` format will work.
</td></tr>
</tbody>

@@ -104,3 +99,3 @@ </table>

// Retrieve an oauth-access token
const oauthAuthentication = await auth({ type: "oauth", code: "123456" });
const oauthAuthentication = await auth({ type: "oauth-user", code: "123456" });
// resolves with

@@ -282,3 +277,3 @@ // {

<td>
<strong>Required</strong>. Must be either <code>"app"</code>, <code>"installation"</code>, or <code>"oauth"</code>.
<strong>Required</strong>. Must be either <code>"app"</code>, <code>"installation"</code>, or <code>"oauth-user"</code>.
</td>

@@ -331,2 +326,3 @@ </tr>

<td>
Only relevant if `type` is set to `"installation"`.

@@ -376,3 +372,3 @@

<td>
Only relevant if <code>type</code> is set to <code>"oauth"</code>.<br>
Only relevant if <code>type</code> is set to <code>"oauth-user"</code>.<br>
<br>

@@ -390,3 +386,3 @@ The authorization <code>code</code> which was passed as query parameter to the callback URL from the <a href="https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github">OAuth web application flow</a>.

<td>
Only relevant if <code>type</code> is set to <code>"oauth"</code>.<br>
Only relevant if <code>type</code> is set to <code>"oauth-user"</code>.<br>
<br>

@@ -404,3 +400,3 @@ The URL in your application where users are sent after authorization. See <a href="https://docs.github.com/en/developers/apps/authorizing-oauth-apps#redirect-urls">redirect urls</a>.

<td>
Only relevant if <code>type</code> is set to <code>"oauth"</code>.<br>
Only relevant if <code>type</code> is set to <code>"oauth-user"</code>.<br>
<br>

@@ -688,3 +684,3 @@ The unguessable random string you provided in Step 1 of the <a href="https://docs.github.com/en/developers/apps/authorizing-oauth-apps#2-users-are-redirected-back-to-your-site-by-github">OAuth web application flow</a>.

const { token } = await auth({
type: "oauth",
type: "oauth-user",
code: "123456",

@@ -691,0 +687,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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