antarctic 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +252 -0
- package/dist/auth.d.ts +19 -11
- package/dist/auth.js +16 -23
- package/dist/index.d.ts +1 -1
- package/dist/providers/42.d.ts +4 -4
- package/dist/providers/42.js +9 -8
- package/dist/providers/amazon-cognito.d.ts +4 -4
- package/dist/providers/amazon-cognito.js +9 -8
- package/dist/providers/anilist.d.ts +4 -4
- package/dist/providers/anilist.js +10 -9
- package/dist/providers/apple.d.ts +3 -3
- package/dist/providers/apple.js +8 -7
- package/dist/providers/atlassian.d.ts +4 -4
- package/dist/providers/atlassian.js +9 -8
- package/dist/providers/auth0.d.ts +4 -4
- package/dist/providers/auth0.js +9 -8
- package/dist/providers/authentik.d.ts +4 -4
- package/dist/providers/authentik.js +9 -8
- package/dist/providers/autodesk.d.ts +4 -4
- package/dist/providers/autodesk.js +9 -8
- package/dist/providers/battlenet.d.ts +4 -4
- package/dist/providers/battlenet.js +9 -8
- package/dist/providers/bitbucket.d.ts +4 -4
- package/dist/providers/bitbucket.js +10 -9
- package/dist/providers/box.d.ts +4 -4
- package/dist/providers/box.js +9 -8
- package/dist/providers/bungie.d.ts +4 -4
- package/dist/providers/bungie.js +9 -8
- package/dist/providers/coinbase.d.ts +4 -4
- package/dist/providers/coinbase.js +9 -8
- package/dist/providers/discord.d.ts +4 -4
- package/dist/providers/discord.js +9 -8
- package/dist/providers/donation-alerts.d.ts +4 -4
- package/dist/providers/donation-alerts.js +9 -8
- package/dist/providers/dribbble.d.ts +4 -4
- package/dist/providers/dribbble.js +9 -8
- package/dist/providers/dropbox.d.ts +4 -4
- package/dist/providers/dropbox.js +9 -8
- package/dist/providers/epicgames.d.ts +4 -4
- package/dist/providers/epicgames.js +9 -8
- package/dist/providers/etsy.d.ts +4 -4
- package/dist/providers/etsy.js +8 -7
- package/dist/providers/facebook.d.ts +4 -4
- package/dist/providers/facebook.js +9 -8
- package/dist/providers/figma.d.ts +4 -4
- package/dist/providers/figma.js +9 -8
- package/dist/providers/gitea.d.ts +4 -4
- package/dist/providers/gitea.js +9 -8
- package/dist/providers/github.d.ts +4 -4
- package/dist/providers/github.js +9 -8
- package/dist/providers/gitlab.d.ts +4 -4
- package/dist/providers/gitlab.js +9 -8
- package/dist/providers/google.d.ts +4 -4
- package/dist/providers/google.js +9 -8
- package/dist/providers/intuit.d.ts +4 -4
- package/dist/providers/intuit.js +9 -8
- package/dist/providers/kakao.d.ts +4 -4
- package/dist/providers/kakao.js +9 -8
- package/dist/providers/keycloak.d.ts +4 -4
- package/dist/providers/keycloak.js +9 -8
- package/dist/providers/kick.d.ts +4 -4
- package/dist/providers/kick.js +9 -8
- package/dist/providers/lichess.d.ts +4 -4
- package/dist/providers/lichess.js +9 -8
- package/dist/providers/line.d.ts +4 -4
- package/dist/providers/line.js +9 -8
- package/dist/providers/linear.d.ts +4 -4
- package/dist/providers/linear.js +9 -8
- package/dist/providers/linkedin.d.ts +4 -4
- package/dist/providers/linkedin.js +9 -8
- package/dist/providers/mastodon.d.ts +4 -4
- package/dist/providers/mastodon.js +9 -8
- package/dist/providers/mercadolibre.d.ts +4 -4
- package/dist/providers/mercadolibre.js +10 -9
- package/dist/providers/mercadopago.d.ts +4 -4
- package/dist/providers/mercadopago.js +10 -9
- package/dist/providers/microsoft-entra-id.d.ts +4 -4
- package/dist/providers/microsoft-entra-id.js +9 -8
- package/dist/providers/myanimelist.d.ts +4 -4
- package/dist/providers/myanimelist.js +10 -9
- package/dist/providers/naver.d.ts +4 -4
- package/dist/providers/naver.js +10 -9
- package/dist/providers/notion.d.ts +4 -4
- package/dist/providers/notion.js +10 -9
- package/dist/providers/okta.d.ts +4 -4
- package/dist/providers/okta.js +9 -8
- package/dist/providers/osu.d.ts +4 -4
- package/dist/providers/osu.js +9 -8
- package/dist/providers/patreon.d.ts +4 -4
- package/dist/providers/patreon.js +9 -8
- package/dist/providers/polar.d.ts +4 -4
- package/dist/providers/polar.js +9 -8
- package/dist/providers/reddit.d.ts +4 -4
- package/dist/providers/reddit.js +9 -8
- package/dist/providers/roblox.d.ts +4 -4
- package/dist/providers/roblox.js +9 -8
- package/dist/providers/salesforce.d.ts +4 -4
- package/dist/providers/salesforce.js +9 -8
- package/dist/providers/shikimori.d.ts +4 -4
- package/dist/providers/shikimori.js +10 -9
- package/dist/providers/slack.d.ts +4 -4
- package/dist/providers/slack.js +9 -8
- package/dist/providers/spotify.d.ts +4 -4
- package/dist/providers/spotify.js +9 -8
- package/dist/providers/startgg.d.ts +4 -4
- package/dist/providers/startgg.js +8 -7
- package/dist/providers/strava.d.ts +4 -4
- package/dist/providers/strava.js +9 -8
- package/dist/providers/tiktok.d.ts +4 -4
- package/dist/providers/tiktok.js +9 -8
- package/dist/providers/tiltify.d.ts +4 -4
- package/dist/providers/tiltify.js +9 -8
- package/dist/providers/tumblr.d.ts +4 -4
- package/dist/providers/tumblr.js +9 -8
- package/dist/providers/twitch.d.ts +4 -4
- package/dist/providers/twitch.js +9 -8
- package/dist/providers/twitter.d.ts +4 -4
- package/dist/providers/twitter.js +9 -8
- package/dist/providers/vk.d.ts +4 -4
- package/dist/providers/vk.js +9 -8
- package/dist/providers/withings.d.ts +4 -4
- package/dist/providers/withings.js +9 -8
- package/dist/providers/workos.d.ts +4 -4
- package/dist/providers/workos.js +10 -9
- package/dist/providers/yahoo.d.ts +4 -4
- package/dist/providers/yahoo.js +9 -8
- package/dist/providers/yandex.d.ts +4 -4
- package/dist/providers/yandex.js +9 -8
- package/dist/providers/zoom.d.ts +4 -4
- package/dist/providers/zoom.js +9 -8
- package/package.json +2 -1
- package/readme.md +0 -155
package/dist/providers/github.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ArcticFetchError, createOAuth2Request, createOAuth2RequestError, encodeBasicCredentials, UnexpectedErrorResponseBodyError, UnexpectedResponseError } from "../request.js";
|
|
2
2
|
import { OAuth2Tokens } from "../oauth2.js";
|
|
3
|
-
import {
|
|
3
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthState, parseCallbackQuery, profileId, profileString, requireAuthConfig, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
4
4
|
const authorizationEndpoint = "https://github.com/login/oauth/authorize";
|
|
5
5
|
const tokenEndpoint = "https://github.com/login/oauth/access_token";
|
|
6
6
|
const userEndpoint = "https://api.github.com/user";
|
|
@@ -12,7 +12,7 @@ export class GitHub {
|
|
|
12
12
|
clientSecret;
|
|
13
13
|
redirectURI;
|
|
14
14
|
auth = null;
|
|
15
|
-
constructor(clientIdOrOptions, clientSecret, redirectURI) {
|
|
15
|
+
constructor(clientIdOrOptions = {}, clientSecret, redirectURI) {
|
|
16
16
|
if (typeof clientIdOrOptions === "object") {
|
|
17
17
|
this.auth = resolveAuthConfig(envPrefix, clientIdOrOptions, { clientSecret: true });
|
|
18
18
|
this.clientId = this.auth.clientId;
|
|
@@ -65,13 +65,13 @@ export class GitHub {
|
|
|
65
65
|
const auth = requireAuthConfig(this.auth);
|
|
66
66
|
const state = generateOAuthState();
|
|
67
67
|
const url = this.createAuthorizationURL(state, resolveScopes(scopes, auth, defaultScopes));
|
|
68
|
-
|
|
69
|
-
return url;
|
|
68
|
+
const payload = {};
|
|
69
|
+
return { url, state, payload };
|
|
70
70
|
}
|
|
71
|
-
async getUser(query) {
|
|
72
|
-
|
|
71
|
+
async getUser(query, saved) {
|
|
72
|
+
requireAuthConfig(this.auth);
|
|
73
73
|
const { code, state } = parseCallbackQuery(query);
|
|
74
|
-
|
|
74
|
+
resolveOAuthState(state, saved);
|
|
75
75
|
const tokens = await this.validateAuthorizationCode(code);
|
|
76
76
|
const accessToken = tokens.accessToken();
|
|
77
77
|
const profile = await fetchUserProfile(userEndpoint, accessToken);
|
|
@@ -84,7 +84,8 @@ export class GitHub {
|
|
|
84
84
|
name: profileString(profile.name) ?? profileString(profile.login),
|
|
85
85
|
email,
|
|
86
86
|
image: profileString(profile.avatar_url),
|
|
87
|
-
raw: profile
|
|
87
|
+
raw: profile,
|
|
88
|
+
...extractOAuthTokens(tokens)
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
91
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface GitLabOptions extends ProviderOptions {
|
|
4
4
|
baseURL?: string;
|
|
5
5
|
}
|
|
@@ -10,12 +10,12 @@ export declare class GitLab {
|
|
|
10
10
|
private baseURL;
|
|
11
11
|
private client;
|
|
12
12
|
private auth;
|
|
13
|
-
constructor(options
|
|
13
|
+
constructor(options?: GitLabOptions);
|
|
14
14
|
constructor(baseURL: string, clientId: string, clientSecret: string | null, redirectURI: string);
|
|
15
15
|
createAuthorizationURL(state: string, scopes: string[]): URL;
|
|
16
16
|
validateAuthorizationCode(code: string): Promise<OAuth2Tokens>;
|
|
17
17
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
18
18
|
revokeToken(token: string): Promise<void>;
|
|
19
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
20
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
19
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
20
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
21
21
|
}
|
package/dist/providers/gitlab.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OAuth2Client } from "../client.js";
|
|
2
2
|
import { joinURIAndPath } from "../request.js";
|
|
3
|
-
import {
|
|
3
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthState, parseCallbackQuery, profileId, profileString, requireAuthConfig, requireProviderOption, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
4
4
|
const envPrefix = "GITLAB";
|
|
5
5
|
const defaultScopes = ["openid", "profile", "email"];
|
|
6
6
|
export class GitLab {
|
|
@@ -10,7 +10,7 @@ export class GitLab {
|
|
|
10
10
|
baseURL;
|
|
11
11
|
client;
|
|
12
12
|
auth = null;
|
|
13
|
-
constructor(baseURLOrOptions, clientId, clientSecret, redirectURI) {
|
|
13
|
+
constructor(baseURLOrOptions = {}, clientId, clientSecret, redirectURI) {
|
|
14
14
|
if (typeof baseURLOrOptions === "object") {
|
|
15
15
|
this.auth = resolveAuthConfig(envPrefix, baseURLOrOptions, { redirectURI: true });
|
|
16
16
|
this.baseURL = requireProviderOption(baseURLOrOptions.baseURL, envPrefix, "BASE_URL", "baseURL");
|
|
@@ -43,13 +43,13 @@ export class GitLab {
|
|
|
43
43
|
const auth = requireAuthConfig(this.auth);
|
|
44
44
|
const state = generateOAuthState();
|
|
45
45
|
const url = this.createAuthorizationURL(state, resolveScopes(scopes, auth, defaultScopes));
|
|
46
|
-
|
|
47
|
-
return url;
|
|
46
|
+
const payload = {};
|
|
47
|
+
return { url, state, payload };
|
|
48
48
|
}
|
|
49
|
-
async getUser(query) {
|
|
50
|
-
|
|
49
|
+
async getUser(query, saved) {
|
|
50
|
+
requireAuthConfig(this.auth);
|
|
51
51
|
const { code, state } = parseCallbackQuery(query);
|
|
52
|
-
|
|
52
|
+
resolveOAuthState(state, saved);
|
|
53
53
|
const tokens = await this.validateAuthorizationCode(code);
|
|
54
54
|
// GitLab id_tokens omit profile claims, so always use the OIDC userinfo endpoint.
|
|
55
55
|
const userinfoEndpoint = joinURIAndPath(this.baseURL, "/oauth/userinfo");
|
|
@@ -59,7 +59,8 @@ export class GitLab {
|
|
|
59
59
|
name: profileString(claims.name) ?? profileString(claims.nickname),
|
|
60
60
|
email: profileString(claims.email),
|
|
61
61
|
image: profileString(claims.picture),
|
|
62
|
-
raw: claims
|
|
62
|
+
raw: claims,
|
|
63
|
+
...extractOAuthTokens(tokens)
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface GoogleOptions extends ProviderOptions {
|
|
4
4
|
}
|
|
5
5
|
export declare class Google {
|
|
6
6
|
private client;
|
|
7
7
|
private auth;
|
|
8
|
-
constructor(options
|
|
8
|
+
constructor(options?: GoogleOptions);
|
|
9
9
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
10
10
|
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
11
11
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
12
12
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
13
13
|
revokeToken(token: string): Promise<void>;
|
|
14
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
15
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
14
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
15
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
16
16
|
}
|
package/dist/providers/google.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OAuth2Client, CodeChallengeMethod } from "../client.js";
|
|
2
2
|
import { decodeIdToken } from "../oidc.js";
|
|
3
|
-
import {
|
|
3
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthCodeVerifier, generateOAuthState, InvalidOAuthCallbackError, parseCallbackQuery, profileId, profileString, requireAuthConfig, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
4
4
|
const authorizationEndpoint = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
5
5
|
const tokenEndpoint = "https://oauth2.googleapis.com/token";
|
|
6
6
|
const tokenRevocationEndpoint = "https://oauth2.googleapis.com/revoke";
|
|
@@ -10,7 +10,7 @@ const defaultScopes = ["openid", "profile", "email"];
|
|
|
10
10
|
export class Google {
|
|
11
11
|
client;
|
|
12
12
|
auth = null;
|
|
13
|
-
constructor(clientIdOrOptions, clientSecret, redirectURI) {
|
|
13
|
+
constructor(clientIdOrOptions = {}, clientSecret, redirectURI) {
|
|
14
14
|
if (typeof clientIdOrOptions === "object") {
|
|
15
15
|
this.auth = resolveAuthConfig(envPrefix, clientIdOrOptions, {
|
|
16
16
|
clientSecret: true,
|
|
@@ -42,13 +42,13 @@ export class Google {
|
|
|
42
42
|
const state = generateOAuthState();
|
|
43
43
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
44
44
|
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
45
|
-
|
|
46
|
-
return url;
|
|
45
|
+
const payload = { codeVerifier };
|
|
46
|
+
return { url, state, payload };
|
|
47
47
|
}
|
|
48
|
-
async getUser(query) {
|
|
49
|
-
|
|
48
|
+
async getUser(query, saved) {
|
|
49
|
+
requireAuthConfig(this.auth);
|
|
50
50
|
const { code, state } = parseCallbackQuery(query);
|
|
51
|
-
const stored =
|
|
51
|
+
const stored = resolveOAuthState(state, saved);
|
|
52
52
|
if (typeof stored.codeVerifier !== "string") {
|
|
53
53
|
throw new InvalidOAuthCallbackError("Missing PKCE code verifier for OAuth state");
|
|
54
54
|
}
|
|
@@ -65,7 +65,8 @@ export class Google {
|
|
|
65
65
|
name: profileString(claims.name),
|
|
66
66
|
email: profileString(claims.email),
|
|
67
67
|
image: profileString(claims.picture),
|
|
68
|
-
raw: claims
|
|
68
|
+
raw: claims,
|
|
69
|
+
...extractOAuthTokens(tokens)
|
|
69
70
|
};
|
|
70
71
|
}
|
|
71
72
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface IntuitOptions extends ProviderOptions {
|
|
4
4
|
}
|
|
5
5
|
export declare class Intuit {
|
|
6
6
|
private client;
|
|
7
7
|
private auth;
|
|
8
|
-
constructor(options
|
|
8
|
+
constructor(options?: IntuitOptions);
|
|
9
9
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
10
10
|
createAuthorizationURL(state: string, scopes: string[]): URL;
|
|
11
11
|
validateAuthorizationCode(code: string): Promise<OAuth2Tokens>;
|
|
12
12
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
13
13
|
revokeToken(token: string): Promise<void>;
|
|
14
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
15
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
14
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
15
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
16
16
|
}
|
package/dist/providers/intuit.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OAuth2Client } from "../client.js";
|
|
2
|
-
import {
|
|
2
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthState, parseCallbackQuery, profileId, profileString, requireAuthConfig, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
3
3
|
const authorizationEndpoint = "https://appcenter.intuit.com/connect/oauth2";
|
|
4
4
|
const tokenEndpoint = "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer";
|
|
5
5
|
const tokenRevocationEndpoint = "https://developer.API.intuit.com/v2/oauth2/tokens/revoke";
|
|
@@ -9,7 +9,7 @@ const defaultScopes = ["openid", "profile", "email"];
|
|
|
9
9
|
export class Intuit {
|
|
10
10
|
client;
|
|
11
11
|
auth = null;
|
|
12
|
-
constructor(clientIdOrOptions, clientSecret, redirectURI) {
|
|
12
|
+
constructor(clientIdOrOptions = {}, clientSecret, redirectURI) {
|
|
13
13
|
if (typeof clientIdOrOptions === "object") {
|
|
14
14
|
this.auth = resolveAuthConfig(envPrefix, clientIdOrOptions, {
|
|
15
15
|
clientSecret: true,
|
|
@@ -40,13 +40,13 @@ export class Intuit {
|
|
|
40
40
|
const auth = requireAuthConfig(this.auth);
|
|
41
41
|
const state = generateOAuthState();
|
|
42
42
|
const url = this.createAuthorizationURL(state, resolveScopes(scopes, auth, defaultScopes));
|
|
43
|
-
|
|
44
|
-
return url;
|
|
43
|
+
const payload = {};
|
|
44
|
+
return { url, state, payload };
|
|
45
45
|
}
|
|
46
|
-
async getUser(query) {
|
|
47
|
-
|
|
46
|
+
async getUser(query, saved) {
|
|
47
|
+
requireAuthConfig(this.auth);
|
|
48
48
|
const { code, state } = parseCallbackQuery(query);
|
|
49
|
-
|
|
49
|
+
resolveOAuthState(state, saved);
|
|
50
50
|
const tokens = await this.validateAuthorizationCode(code);
|
|
51
51
|
// Intuit id_tokens omit profile claims, so always use the OIDC userinfo endpoint.
|
|
52
52
|
const claims = await fetchUserProfile(userinfoEndpoint, tokens.accessToken());
|
|
@@ -61,7 +61,8 @@ export class Intuit {
|
|
|
61
61
|
name,
|
|
62
62
|
email: profileString(claims.email),
|
|
63
63
|
image: null,
|
|
64
|
-
raw: claims
|
|
64
|
+
raw: claims,
|
|
65
|
+
...extractOAuthTokens(tokens)
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
68
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface KakaoOptions extends ProviderOptions {
|
|
4
4
|
}
|
|
5
5
|
export declare class Kakao {
|
|
@@ -7,11 +7,11 @@ export declare class Kakao {
|
|
|
7
7
|
private clientSecret;
|
|
8
8
|
private redirectURI;
|
|
9
9
|
private auth;
|
|
10
|
-
constructor(options
|
|
10
|
+
constructor(options?: KakaoOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
12
12
|
createAuthorizationURL(state: string, scopes: string[]): URL;
|
|
13
13
|
validateAuthorizationCode(code: string): Promise<OAuth2Tokens>;
|
|
14
14
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
15
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
16
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
15
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
16
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
17
17
|
}
|
package/dist/providers/kakao.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createOAuth2Request, sendTokenRequest } from "../request.js";
|
|
2
|
-
import {
|
|
2
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthState, parseCallbackQuery, profileId, profileString, requireAuthConfig, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
3
3
|
const authorizationEndpoint = "https://kauth.kakao.com/oauth/authorize";
|
|
4
4
|
const tokenEndpoint = "https://kauth.kakao.com/oauth/token";
|
|
5
5
|
const userEndpoint = "https://kapi.kakao.com/v2/user/me";
|
|
@@ -10,7 +10,7 @@ export class Kakao {
|
|
|
10
10
|
clientSecret;
|
|
11
11
|
redirectURI;
|
|
12
12
|
auth = null;
|
|
13
|
-
constructor(clientIdOrOptions, clientSecret, redirectURI) {
|
|
13
|
+
constructor(clientIdOrOptions = {}, clientSecret, redirectURI) {
|
|
14
14
|
if (typeof clientIdOrOptions === "object") {
|
|
15
15
|
this.auth = resolveAuthConfig(envPrefix, clientIdOrOptions, {
|
|
16
16
|
clientSecret: true,
|
|
@@ -62,13 +62,13 @@ export class Kakao {
|
|
|
62
62
|
const auth = requireAuthConfig(this.auth);
|
|
63
63
|
const state = generateOAuthState();
|
|
64
64
|
const url = this.createAuthorizationURL(state, resolveScopes(scopes, auth, defaultScopes));
|
|
65
|
-
|
|
66
|
-
return url;
|
|
65
|
+
const payload = {};
|
|
66
|
+
return { url, state, payload };
|
|
67
67
|
}
|
|
68
|
-
async getUser(query) {
|
|
69
|
-
|
|
68
|
+
async getUser(query, saved) {
|
|
69
|
+
requireAuthConfig(this.auth);
|
|
70
70
|
const { code, state } = parseCallbackQuery(query);
|
|
71
|
-
|
|
71
|
+
resolveOAuthState(state, saved);
|
|
72
72
|
const tokens = await this.validateAuthorizationCode(code);
|
|
73
73
|
const profile = await fetchUserProfile(userEndpoint, tokens.accessToken());
|
|
74
74
|
let name = null;
|
|
@@ -90,7 +90,8 @@ export class Kakao {
|
|
|
90
90
|
name,
|
|
91
91
|
email,
|
|
92
92
|
image,
|
|
93
|
-
raw: profile
|
|
93
|
+
raw: profile,
|
|
94
|
+
...extractOAuthTokens(tokens)
|
|
94
95
|
};
|
|
95
96
|
}
|
|
96
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface KeyCloakOptions extends ProviderOptions {
|
|
4
4
|
realmURL?: string;
|
|
5
5
|
}
|
|
@@ -10,12 +10,12 @@ export declare class KeyCloak {
|
|
|
10
10
|
private userinfoEndpoint;
|
|
11
11
|
private client;
|
|
12
12
|
private auth;
|
|
13
|
-
constructor(options
|
|
13
|
+
constructor(options?: KeyCloakOptions);
|
|
14
14
|
constructor(realmURL: string, clientId: string, clientSecret: string | null, redirectURI: string);
|
|
15
15
|
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
16
16
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
17
17
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
18
18
|
revokeToken(token: string): Promise<void>;
|
|
19
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
20
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
19
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
20
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CodeChallengeMethod, OAuth2Client } from "../client.js";
|
|
2
2
|
import { decodeIdToken } from "../oidc.js";
|
|
3
|
-
import {
|
|
3
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthCodeVerifier, generateOAuthState, InvalidOAuthCallbackError, parseCallbackQuery, profileId, profileString, requireAuthConfig, requireProviderOption, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
4
4
|
const envPrefix = "KEYCLOAK";
|
|
5
5
|
const defaultScopes = ["openid", "profile", "email"];
|
|
6
6
|
export class KeyCloak {
|
|
@@ -10,7 +10,7 @@ export class KeyCloak {
|
|
|
10
10
|
userinfoEndpoint;
|
|
11
11
|
client;
|
|
12
12
|
auth = null;
|
|
13
|
-
constructor(realmURLOrOptions, clientId, clientSecret, redirectURI) {
|
|
13
|
+
constructor(realmURLOrOptions = {}, clientId, clientSecret, redirectURI) {
|
|
14
14
|
let realmURL;
|
|
15
15
|
if (typeof realmURLOrOptions === "object") {
|
|
16
16
|
this.auth = resolveAuthConfig(envPrefix, realmURLOrOptions, { redirectURI: true });
|
|
@@ -46,13 +46,13 @@ export class KeyCloak {
|
|
|
46
46
|
const state = generateOAuthState();
|
|
47
47
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
48
48
|
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
49
|
-
|
|
50
|
-
return url;
|
|
49
|
+
const payload = { codeVerifier };
|
|
50
|
+
return { url, state, payload };
|
|
51
51
|
}
|
|
52
|
-
async getUser(query) {
|
|
53
|
-
|
|
52
|
+
async getUser(query, saved) {
|
|
53
|
+
requireAuthConfig(this.auth);
|
|
54
54
|
const { code, state } = parseCallbackQuery(query);
|
|
55
|
-
const stored =
|
|
55
|
+
const stored = resolveOAuthState(state, saved);
|
|
56
56
|
if (typeof stored.codeVerifier !== "string") {
|
|
57
57
|
throw new InvalidOAuthCallbackError("Missing PKCE code verifier for OAuth state");
|
|
58
58
|
}
|
|
@@ -69,7 +69,8 @@ export class KeyCloak {
|
|
|
69
69
|
name: profileString(claims.name) ?? profileString(claims.preferred_username),
|
|
70
70
|
email: profileString(claims.email),
|
|
71
71
|
image: profileString(claims.picture),
|
|
72
|
-
raw: claims
|
|
72
|
+
raw: claims,
|
|
73
|
+
...extractOAuthTokens(tokens)
|
|
73
74
|
};
|
|
74
75
|
}
|
|
75
76
|
}
|
package/dist/providers/kick.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface KickOptions extends ProviderOptions {
|
|
4
4
|
}
|
|
5
5
|
export declare class Kick {
|
|
@@ -7,12 +7,12 @@ export declare class Kick {
|
|
|
7
7
|
private clientSecret;
|
|
8
8
|
private redirectURI;
|
|
9
9
|
private auth;
|
|
10
|
-
constructor(options
|
|
10
|
+
constructor(options?: KickOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
12
12
|
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
13
13
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
14
14
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
15
15
|
revokeToken(token: string): Promise<void>;
|
|
16
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
17
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
16
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
17
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
18
18
|
}
|
package/dist/providers/kick.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createOAuth2Request, sendTokenRequest, sendTokenRevocationRequest } from "../request.js";
|
|
2
2
|
import { createS256CodeChallenge } from "../oauth2.js";
|
|
3
|
-
import {
|
|
3
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthCodeVerifier, generateOAuthState, InvalidOAuthCallbackError, OAuthProviderError, parseCallbackQuery, profileId, profileString, requireAuthConfig, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
4
4
|
const authorizationEndpoint = "https://id.kick.com/oauth/authorize";
|
|
5
5
|
const tokenEndpoint = "https://id.kick.com/oauth/token";
|
|
6
6
|
const tokenRevocationEndpoint = "https://id.kick.com/oauth/revoke";
|
|
@@ -12,7 +12,7 @@ export class Kick {
|
|
|
12
12
|
clientSecret;
|
|
13
13
|
redirectURI;
|
|
14
14
|
auth = null;
|
|
15
|
-
constructor(clientIdOrOptions, clientSecret, redirectURI) {
|
|
15
|
+
constructor(clientIdOrOptions = {}, clientSecret, redirectURI) {
|
|
16
16
|
if (typeof clientIdOrOptions === "object") {
|
|
17
17
|
this.auth = resolveAuthConfig(envPrefix, clientIdOrOptions, {
|
|
18
18
|
clientSecret: true,
|
|
@@ -75,13 +75,13 @@ export class Kick {
|
|
|
75
75
|
const state = generateOAuthState();
|
|
76
76
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
77
77
|
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
78
|
-
|
|
79
|
-
return url;
|
|
78
|
+
const payload = { codeVerifier };
|
|
79
|
+
return { url, state, payload };
|
|
80
80
|
}
|
|
81
|
-
async getUser(query) {
|
|
82
|
-
|
|
81
|
+
async getUser(query, saved) {
|
|
82
|
+
requireAuthConfig(this.auth);
|
|
83
83
|
const { code, state } = parseCallbackQuery(query);
|
|
84
|
-
const stored =
|
|
84
|
+
const stored = resolveOAuthState(state, saved);
|
|
85
85
|
if (typeof stored.codeVerifier !== "string") {
|
|
86
86
|
throw new InvalidOAuthCallbackError("Missing PKCE code verifier for OAuth state");
|
|
87
87
|
}
|
|
@@ -98,7 +98,8 @@ export class Kick {
|
|
|
98
98
|
name: profileString(profile.name),
|
|
99
99
|
email: profileString(profile.email),
|
|
100
100
|
image: profileString(profile.profile_picture),
|
|
101
|
-
raw: profile
|
|
101
|
+
raw: profile,
|
|
102
|
+
...extractOAuthTokens(tokens)
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
105
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface LichessOptions extends ProviderOptions {
|
|
4
4
|
}
|
|
5
5
|
export declare class Lichess {
|
|
6
6
|
private client;
|
|
7
7
|
private auth;
|
|
8
|
-
constructor(options
|
|
8
|
+
constructor(options?: LichessOptions);
|
|
9
9
|
constructor(clientId: string, redirectURI: string);
|
|
10
10
|
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
11
11
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
12
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
13
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
12
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
13
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OAuth2Client, CodeChallengeMethod } from "../client.js";
|
|
2
|
-
import {
|
|
2
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthCodeVerifier, generateOAuthState, InvalidOAuthCallbackError, parseCallbackQuery, profileId, profileString, requireAuthConfig, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
3
3
|
const authorizationEndpoint = "https://lichess.org/oauth";
|
|
4
4
|
const tokenEndpoint = "https://lichess.org/api/token";
|
|
5
5
|
const accountEndpoint = "https://lichess.org/api/account";
|
|
@@ -9,7 +9,7 @@ const defaultScopes = ["email:read"];
|
|
|
9
9
|
export class Lichess {
|
|
10
10
|
client;
|
|
11
11
|
auth = null;
|
|
12
|
-
constructor(clientIdOrOptions, redirectURI) {
|
|
12
|
+
constructor(clientIdOrOptions = {}, redirectURI) {
|
|
13
13
|
if (typeof clientIdOrOptions === "object") {
|
|
14
14
|
this.auth = resolveAuthConfig(envPrefix, clientIdOrOptions, { redirectURI: true });
|
|
15
15
|
this.client = new OAuth2Client(this.auth.clientId, null, this.auth.redirectURI);
|
|
@@ -31,13 +31,13 @@ export class Lichess {
|
|
|
31
31
|
const state = generateOAuthState();
|
|
32
32
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
33
33
|
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
34
|
-
|
|
35
|
-
return url;
|
|
34
|
+
const payload = { codeVerifier };
|
|
35
|
+
return { url, state, payload };
|
|
36
36
|
}
|
|
37
|
-
async getUser(query) {
|
|
38
|
-
|
|
37
|
+
async getUser(query, saved) {
|
|
38
|
+
requireAuthConfig(this.auth);
|
|
39
39
|
const { code, state } = parseCallbackQuery(query);
|
|
40
|
-
const stored =
|
|
40
|
+
const stored = resolveOAuthState(state, saved);
|
|
41
41
|
if (typeof stored.codeVerifier !== "string") {
|
|
42
42
|
throw new InvalidOAuthCallbackError("Missing PKCE code verifier for OAuth state");
|
|
43
43
|
}
|
|
@@ -58,7 +58,8 @@ export class Lichess {
|
|
|
58
58
|
name: profileString(profile.username),
|
|
59
59
|
email,
|
|
60
60
|
image: null,
|
|
61
|
-
raw: profile
|
|
61
|
+
raw: profile,
|
|
62
|
+
...extractOAuthTokens(tokens)
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
65
|
}
|
package/dist/providers/line.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface LineOptions extends ProviderOptions {
|
|
4
4
|
}
|
|
5
5
|
export declare class Line {
|
|
@@ -7,11 +7,11 @@ export declare class Line {
|
|
|
7
7
|
private clientSecret;
|
|
8
8
|
private redirectURI;
|
|
9
9
|
private auth;
|
|
10
|
-
constructor(options
|
|
10
|
+
constructor(options?: LineOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
12
12
|
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
13
13
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
14
14
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
15
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
16
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
15
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
16
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
17
17
|
}
|
package/dist/providers/line.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createS256CodeChallenge } from "../oauth2.js";
|
|
2
2
|
import { createOAuth2Request, sendTokenRequest } from "../request.js";
|
|
3
3
|
import { decodeIdToken } from "../oidc.js";
|
|
4
|
-
import {
|
|
4
|
+
import { extractOAuthTokens, fetchUserProfile, generateOAuthCodeVerifier, generateOAuthState, InvalidOAuthCallbackError, parseCallbackQuery, profileId, profileString, requireAuthConfig, resolveAuthConfig, resolveOAuthState, resolveScopes } from "../auth.js";
|
|
5
5
|
const authorizationEndpoint = "https://access.line.me/oauth2/v2.1/authorize";
|
|
6
6
|
const tokenEndpoint = "https://api.line.me/oauth2/v2.1/token";
|
|
7
7
|
const userinfoEndpoint = "https://api.line.me/oauth2/v2.1/userinfo";
|
|
@@ -12,7 +12,7 @@ export class Line {
|
|
|
12
12
|
clientSecret;
|
|
13
13
|
redirectURI;
|
|
14
14
|
auth = null;
|
|
15
|
-
constructor(clientIdOrOptions, clientSecret, redirectURI) {
|
|
15
|
+
constructor(clientIdOrOptions = {}, clientSecret, redirectURI) {
|
|
16
16
|
if (typeof clientIdOrOptions === "object") {
|
|
17
17
|
this.auth = resolveAuthConfig(envPrefix, clientIdOrOptions, {
|
|
18
18
|
clientSecret: true,
|
|
@@ -69,13 +69,13 @@ export class Line {
|
|
|
69
69
|
const state = generateOAuthState();
|
|
70
70
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
71
71
|
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
72
|
-
|
|
73
|
-
return url;
|
|
72
|
+
const payload = { codeVerifier };
|
|
73
|
+
return { url, state, payload };
|
|
74
74
|
}
|
|
75
|
-
async getUser(query) {
|
|
76
|
-
|
|
75
|
+
async getUser(query, saved) {
|
|
76
|
+
requireAuthConfig(this.auth);
|
|
77
77
|
const { code, state } = parseCallbackQuery(query);
|
|
78
|
-
const stored =
|
|
78
|
+
const stored = resolveOAuthState(state, saved);
|
|
79
79
|
if (typeof stored.codeVerifier !== "string") {
|
|
80
80
|
throw new InvalidOAuthCallbackError("Missing PKCE code verifier for OAuth state");
|
|
81
81
|
}
|
|
@@ -93,7 +93,8 @@ export class Line {
|
|
|
93
93
|
name: profileString(claims.name),
|
|
94
94
|
email: profileString(claims.email),
|
|
95
95
|
image: profileString(claims.picture),
|
|
96
|
-
raw: claims
|
|
96
|
+
raw: claims,
|
|
97
|
+
...extractOAuthTokens(tokens)
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OAuth2Tokens } from "../oauth2.js";
|
|
2
|
-
import type { OAuthCallbackQuery, OAuthUser, ProviderOptions } from "../auth.js";
|
|
2
|
+
import type { AuthorizationRequest, OAuthCallbackQuery, OAuthUser, ProviderOptions, SavedOAuthState } from "../auth.js";
|
|
3
3
|
export interface LinearOptions extends ProviderOptions {
|
|
4
4
|
}
|
|
5
5
|
export declare class Linear {
|
|
@@ -7,10 +7,10 @@ export declare class Linear {
|
|
|
7
7
|
private clientSecret;
|
|
8
8
|
private redirectURI;
|
|
9
9
|
private auth;
|
|
10
|
-
constructor(options
|
|
10
|
+
constructor(options?: LinearOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
12
12
|
createAuthorizationURL(state: string, scopes: string[]): URL;
|
|
13
13
|
validateAuthorizationCode(code: string): Promise<OAuth2Tokens>;
|
|
14
|
-
getAuthorizationURL(scopes?: string[]): Promise<
|
|
15
|
-
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
14
|
+
getAuthorizationURL(scopes?: string[]): Promise<AuthorizationRequest>;
|
|
15
|
+
getUser(query: OAuthCallbackQuery, saved: SavedOAuthState): Promise<OAuthUser>;
|
|
16
16
|
}
|