@octokit/auth-app
Advanced tools
Comparing version 2.4.8 to 2.4.9
@@ -108,5 +108,8 @@ 'use strict'; | ||
const installationId = options.installationId || state.installationId; | ||
const optionsWithInstallationTokenFromState = Object.assign({ | ||
installationId | ||
}, options); | ||
if (!options.refresh) { | ||
const result = await get(state.cache, options); | ||
const result = await get(state.cache, optionsWithInstallationTokenFromState); | ||
@@ -162,3 +165,3 @@ if (result) { | ||
const createdAt = new Date().toISOString(); | ||
await set(state.cache, options, { | ||
await set(state.cache, optionsWithInstallationTokenFromState, { | ||
token, | ||
@@ -316,3 +319,3 @@ createdAt, | ||
const VERSION = "2.4.8"; | ||
const VERSION = "2.4.9"; | ||
@@ -319,0 +322,0 @@ const createAppAuth = function createAppAuth(options) { |
@@ -7,4 +7,5 @@ import { get, set } from "./cache"; | ||
state.installationId); | ||
const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options); | ||
if (!options.refresh) { | ||
const result = await get(state.cache, options); | ||
const result = await get(state.cache, optionsWithInstallationTokenFromState); | ||
if (result) { | ||
@@ -45,3 +46,3 @@ const { token, createdAt, expiresAt, permissions, repositoryIds, singleFileName, repositorySelection, } = result; | ||
const createdAt = new Date().toISOString(); | ||
await set(state.cache, options, { | ||
await set(state.cache, optionsWithInstallationTokenFromState, { | ||
token, | ||
@@ -48,0 +49,0 @@ createdAt, |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "2.4.8"; | ||
export const VERSION = "2.4.9"; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "2.4.8"; | ||
export declare const VERSION = "2.4.9"; |
@@ -99,4 +99,5 @@ import { getUserAgent } from 'universal-user-agent'; | ||
state.installationId); | ||
const optionsWithInstallationTokenFromState = Object.assign({ installationId }, options); | ||
if (!options.refresh) { | ||
const result = await get(state.cache, options); | ||
const result = await get(state.cache, optionsWithInstallationTokenFromState); | ||
if (result) { | ||
@@ -137,3 +138,3 @@ const { token, createdAt, expiresAt, permissions, repositoryIds, singleFileName, repositorySelection, } = result; | ||
const createdAt = new Date().toISOString(); | ||
await set(state.cache, options, { | ||
await set(state.cache, optionsWithInstallationTokenFromState, { | ||
token, | ||
@@ -286,3 +287,3 @@ createdAt, | ||
const VERSION = "2.4.8"; | ||
const VERSION = "2.4.9"; | ||
@@ -289,0 +290,0 @@ const createAppAuth = function createAppAuth(options) { |
{ | ||
"name": "@octokit/auth-app", | ||
"description": "GitHub App authentication for JavaScript", | ||
"version": "2.4.8", | ||
"version": "2.4.9", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -21,3 +21,3 @@ # auth-app.js | ||
- [OAuth access token authentication](#oauth-access-token-authentication) | ||
- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parametersorauthhookrequest-options) | ||
- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) | ||
- [Implementation details](#implementation-details) | ||
@@ -24,0 +24,0 @@ - [License](#license) |
Sorry, the diff of this file is not supported yet
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
102704
1004