@octokit/oauth-app
Advanced tools
Comparing version 4.2.0 to 4.2.1
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
163256
1874