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

@octokit/oauth-app

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@octokit/oauth-app - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

18

dist-node/index.js

@@ -15,3 +15,3 @@ 'use strict';

const VERSION = "4.2.0";
const VERSION = "4.2.1";

@@ -78,12 +78,2 @@ function addEventHandler(state, eventName, eventHandler) {

function getWebFlowAuthorizationUrlWithState(state, options) {
let allowSignup;
if (options.allowSignup === undefined && state.allowSignup === undefined) {
allowSignup = true;
} else if (options.allowSignup === undefined && state.allowSignup !== undefined) {
allowSignup = state.allowSignup;
} else if (state.allowSignup === undefined && options.allowSignup !== undefined) {
allowSignup = options.allowSignup;
} else {
allowSignup = options.allowSignup || state.allowSignup;
}
const optionsWithDefaults = {

@@ -93,5 +83,5 @@ clientId: state.clientId,

...options,
allowSignup,
redirectUrl: options.redirectUrl || state.redirectUrl,
scopes: options.scopes || state.defaultScopes
allowSignup: state.allowSignup ?? options.allowSignup,
redirectUrl: options.redirectUrl ?? state.redirectUrl,
scopes: options.scopes ?? state.defaultScopes
};

@@ -98,0 +88,0 @@ return OAuthMethods.getWebFlowAuthorizationUrl({

@@ -19,3 +19,3 @@ import { createOAuthAppAuth } from "@octokit/auth-oauth-app";

export { createAWSLambdaAPIGatewayV2Handler } from "./middleware/aws-lambda/api-gateway-v2";
export class OAuthApp {
class OAuthApp {
static defaults(defaults) {

@@ -73,1 +73,2 @@ const OAuthAppWithDefaults = class extends this {

OAuthApp.VERSION = VERSION;
export { OAuthApp };
import * as OAuthMethods from "@octokit/oauth-methods";
export function getWebFlowAuthorizationUrlWithState(state, options) {
let allowSignup;
if (options.allowSignup === undefined && state.allowSignup === undefined) {
allowSignup = true;
}
else if (options.allowSignup === undefined &&
state.allowSignup !== undefined) {
allowSignup = state.allowSignup;
}
else if (state.allowSignup === undefined &&
options.allowSignup !== undefined) {
allowSignup = options.allowSignup;
}
else {
allowSignup = options.allowSignup || state.allowSignup;
}
const optionsWithDefaults = {

@@ -22,5 +7,5 @@ clientId: state.clientId,

...options,
allowSignup,
redirectUrl: options.redirectUrl || state.redirectUrl,
scopes: options.scopes || state.defaultScopes,
allowSignup: state.allowSignup ?? options.allowSignup,
redirectUrl: options.redirectUrl ?? state.redirectUrl,
scopes: options.scopes ?? state.defaultScopes,
};

@@ -27,0 +12,0 @@ return OAuthMethods.getWebFlowAuthorizationUrl({

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

export const VERSION = "4.2.0";
export const VERSION = "4.2.1";

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

export declare const VERSION = "4.2.0";
export declare const VERSION = "4.2.1";
{
"name": "@octokit/oauth-app",
"description": "GitHub OAuth toolset for Node.js",
"version": "4.2.0",
"version": "4.2.1",
"license": "MIT",
"files": [
"dist-*/",
"bin/"
"dist-*/**",
"bin/**"
],

@@ -45,6 +45,6 @@ "source": "dist-src/index.js",

"node-fetch": "^2.6.0",
"prettier": "2.8.0",
"prettier": "2.8.8",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"ts-jest": "^29.0.0",
"typescript": "^4.0.2"
"typescript": "^5.0.0"
},

@@ -51,0 +51,0 @@ "engines": {

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