@octokit/auth-app
Advanced tools
Comparing version 3.2.0 to 3.3.0
@@ -459,3 +459,3 @@ 'use strict'; | ||
const VERSION = "3.2.0"; | ||
const VERSION = "3.3.0"; | ||
@@ -462,0 +462,0 @@ const createAppAuth = function createAppAuth(options) { |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "3.2.0"; | ||
export const VERSION = "3.3.0"; |
import { StrategyInterface } from "./types"; | ||
export { createOAuthUserAuth } from "@octokit/auth-oauth-user"; | ||
export { StrategyOptions, AuthOptions, AppAuthOptions, OAuthAppAuthOptions, InstallationAuthOptions, OAuthWebFlowAuthOptions, OAuthDeviceFlowAuthOptions, Authentication, AppAuthentication, OAuthAppAuthentication, InstallationAccessTokenAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, } from "./types"; | ||
export declare const createAppAuth: StrategyInterface; |
import * as OctokitTypes from "@octokit/types"; | ||
import LRUCache from "lru-cache"; | ||
import { GitHubAuthInterface, AppAuthentication as OAuthAppAuthentication, GitHubAppUserAuthentication, GitHubAppUserAuthenticationWithExpiration, AppAuthOptions as OAuthAppAuthOptions, WebFlowAuthOptions, GitHubAppDeviceFlowAuthOptions } from "@octokit/auth-oauth-app"; | ||
import * as OAuthAppAuth from "@octokit/auth-oauth-app"; | ||
export declare type AnyResponse = OctokitTypes.OctokitResponse<any>; | ||
@@ -53,2 +53,5 @@ export declare type EndpointDefaults = OctokitTypes.EndpointDefaults; | ||
}; | ||
export declare type OAuthAppAuthentication = OAuthAppAuth.AppAuthentication; | ||
export declare type GitHubAppUserAuthentication = OAuthAppAuth.GitHubAppUserAuthentication; | ||
export declare type GitHubAppUserAuthenticationWithExpiration = OAuthAppAuth.GitHubAppUserAuthenticationWithExpiration; | ||
export declare type Authentication = AppAuthentication | OAuthAppAuthentication | InstallationAccessTokenAuthentication | GitHubAppUserAuthentication | GitHubAppUserAuthenticationWithExpiration; | ||
@@ -90,3 +93,6 @@ declare type OAuthStrategyOptions = { | ||
}; | ||
export declare type AuthOptions = AppAuthOptions | OAuthAppAuthOptions | InstallationAuthOptions | WebFlowAuthOptions | GitHubAppDeviceFlowAuthOptions; | ||
export declare type OAuthAppAuthOptions = OAuthAppAuth.AppAuthOptions; | ||
export declare type OAuthWebFlowAuthOptions = OAuthAppAuth.WebFlowAuthOptions; | ||
export declare type OAuthDeviceFlowAuthOptions = OAuthAppAuth.GitHubAppDeviceFlowAuthOptions; | ||
export declare type AuthOptions = AppAuthOptions | OAuthAppAuthOptions | InstallationAuthOptions | OAuthWebFlowAuthOptions | OAuthDeviceFlowAuthOptions; | ||
export declare type WithInstallationId = { | ||
@@ -98,4 +104,4 @@ installationId: number; | ||
} & OAuthStrategyOptions & { | ||
oauthApp: GitHubAuthInterface; | ||
oauthApp: OAuthAppAuth.GitHubAuthInterface; | ||
}; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "3.2.0"; | ||
export declare const VERSION = "3.3.0"; |
@@ -329,3 +329,3 @@ import { getUserAgent } from 'universal-user-agent'; | ||
const VERSION = "3.2.0"; | ||
const VERSION = "3.3.0"; | ||
@@ -332,0 +332,0 @@ const createAppAuth = function createAppAuth(options) { |
{ | ||
"name": "@octokit/auth-app", | ||
"description": "GitHub App authentication for JavaScript", | ||
"version": "3.2.0", | ||
"version": "3.3.0", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -32,2 +32,3 @@ # auth-app.js | ||
- [`auth.hook(request, route, parameters)` or `auth.hook(request, options)`](#authhookrequest-route-parameters-or-authhookrequest-options) | ||
- [Types](#types) | ||
- [Implementation details](#implementation-details) | ||
@@ -46,4 +47,14 @@ - [License](#license) | ||
Load `@octokit/auth-app` directly from [cdn.skypack.dev](https://cdn.skypack.dev) | ||
⚠️ `@octokit/auth-app` is not meant for usage in the browser. A private key and client secret must not be exposed to users. | ||
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 | ||
``` | ||
The OAuth APIs to create user-to-server tokens cannot be used because they do not have CORS enabled. | ||
If you know what you are doing, load `@octokit/auth-app` directly from [cdn.skypack.dev](https://cdn.skypack.dev) | ||
```html | ||
@@ -55,10 +66,2 @@ <script type="module"> | ||
⚠️ 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 | ||
``` | ||
Also creating and refreshing OAuth user-to-server tokens is not possible due to CORS restrictions. | ||
</td></tr> | ||
@@ -199,4 +202,14 @@ <tr><th> | ||
Load `@octokit/auth-app` and `@octokit/core` (or a compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev) | ||
⚠️ `@octokit/auth-app` is not meant for usage in the browser. A private key and client secret must not be exposed to users. | ||
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 | ||
``` | ||
The OAuth APIs to create user-to-server tokens cannot be used because they do not have CORS enabled. | ||
If you know what you are doing, load `@octokit/auth-app` and `@octokit/core` (or a compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev) | ||
```html | ||
@@ -209,10 +222,2 @@ <script type="module"> | ||
⚠️ 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 | ||
``` | ||
Also creating and refreshing OAuth user-to-server tokens is not possible due to CORS restrictions. | ||
</td></tr> | ||
@@ -1353,2 +1358,25 @@ <tr><th> | ||
## Types | ||
```ts | ||
import { | ||
// strategy options | ||
StrategyOptions, | ||
// auth options | ||
AuthOptions, | ||
AppAuthOptions, | ||
OAuthAppAuthOptions, | ||
InstallationAuthOptions, | ||
OAuthWebFlowAuthOptions, | ||
OAuthDeviceFlowAuthOptions, | ||
// authentication objects | ||
Authentication, | ||
AppAuthentication, | ||
OAuthAppAuthentication, | ||
InstallationAccessTokenAuthentication, | ||
GitHubAppUserAuthentication, | ||
GitHubAppUserAuthenticationWithExpiration, | ||
} from "@octokit/auth-app"; | ||
``` | ||
## Implementation details | ||
@@ -1355,0 +1383,0 @@ |
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
141243
1270
1387