antarctic 0.3.0 → 0.5.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/dist/auth.d.ts +1 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +2 -2
- package/dist/oauth2.d.ts +1 -1
- package/dist/oauth2.js +4 -4
- package/dist/providers/42.js +2 -1
- package/dist/providers/amazon-cognito.d.ts +1 -1
- package/dist/providers/amazon-cognito.js +5 -4
- package/dist/providers/anilist.js +2 -1
- package/dist/providers/apple.js +2 -1
- package/dist/providers/atlassian.js +2 -1
- package/dist/providers/auth0.d.ts +1 -1
- package/dist/providers/auth0.js +5 -4
- package/dist/providers/authentik.d.ts +1 -1
- package/dist/providers/authentik.js +5 -4
- package/dist/providers/autodesk.d.ts +1 -1
- package/dist/providers/autodesk.js +5 -4
- package/dist/providers/battlenet.js +2 -1
- package/dist/providers/bitbucket.js +2 -1
- package/dist/providers/box.js +2 -1
- package/dist/providers/bungie.js +2 -1
- package/dist/providers/coinbase.js +2 -1
- package/dist/providers/discord.d.ts +1 -1
- package/dist/providers/discord.js +5 -4
- package/dist/providers/donation-alerts.js +2 -1
- package/dist/providers/dribbble.js +2 -1
- package/dist/providers/dropbox.js +2 -1
- package/dist/providers/epicgames.js +2 -1
- package/dist/providers/etsy.d.ts +1 -1
- package/dist/providers/etsy.js +5 -4
- package/dist/providers/facebook.js +2 -1
- package/dist/providers/figma.js +2 -1
- package/dist/providers/gitea.d.ts +1 -1
- package/dist/providers/gitea.js +5 -4
- package/dist/providers/github.js +2 -1
- package/dist/providers/gitlab.js +2 -1
- package/dist/providers/google.d.ts +1 -1
- package/dist/providers/google.js +5 -4
- package/dist/providers/intuit.js +2 -1
- package/dist/providers/kakao.js +2 -1
- package/dist/providers/keycloak.d.ts +1 -1
- package/dist/providers/keycloak.js +5 -4
- package/dist/providers/kick.d.ts +1 -1
- package/dist/providers/kick.js +5 -4
- package/dist/providers/lichess.d.ts +1 -1
- package/dist/providers/lichess.js +5 -4
- package/dist/providers/line.d.ts +1 -1
- package/dist/providers/line.js +5 -4
- package/dist/providers/linear.js +2 -1
- package/dist/providers/linkedin.js +2 -1
- package/dist/providers/mastodon.d.ts +1 -1
- package/dist/providers/mastodon.js +5 -4
- package/dist/providers/mercadolibre.d.ts +1 -1
- package/dist/providers/mercadolibre.js +5 -4
- package/dist/providers/mercadopago.d.ts +1 -1
- package/dist/providers/mercadopago.js +5 -4
- package/dist/providers/microsoft-entra-id.d.ts +1 -1
- package/dist/providers/microsoft-entra-id.js +5 -4
- package/dist/providers/myanimelist.d.ts +1 -1
- package/dist/providers/myanimelist.js +5 -4
- package/dist/providers/naver.js +2 -1
- package/dist/providers/notion.js +2 -1
- package/dist/providers/okta.d.ts +1 -1
- package/dist/providers/okta.js +5 -4
- package/dist/providers/osu.js +2 -1
- package/dist/providers/patreon.js +2 -1
- package/dist/providers/polar.d.ts +1 -1
- package/dist/providers/polar.js +5 -4
- package/dist/providers/reddit.js +2 -1
- package/dist/providers/roblox.d.ts +1 -1
- package/dist/providers/roblox.js +5 -4
- package/dist/providers/salesforce.d.ts +1 -1
- package/dist/providers/salesforce.js +5 -4
- package/dist/providers/shikimori.js +2 -1
- package/dist/providers/slack.js +2 -1
- package/dist/providers/spotify.d.ts +1 -1
- package/dist/providers/spotify.js +5 -4
- package/dist/providers/startgg.js +2 -1
- package/dist/providers/strava.js +2 -1
- package/dist/providers/synology.d.ts +1 -1
- package/dist/providers/synology.js +2 -2
- package/dist/providers/tiktok.d.ts +1 -1
- package/dist/providers/tiktok.js +5 -4
- package/dist/providers/tiltify.js +2 -1
- package/dist/providers/tumblr.js +2 -1
- package/dist/providers/twitch.js +2 -1
- package/dist/providers/twitter.d.ts +1 -1
- package/dist/providers/twitter.js +5 -4
- package/dist/providers/vk.js +2 -1
- package/dist/providers/withings.js +2 -1
- package/dist/providers/workos.d.ts +1 -1
- package/dist/providers/workos.js +5 -4
- package/dist/providers/yahoo.js +2 -1
- package/dist/providers/yandex.js +2 -1
- package/dist/providers/zoom.d.ts +1 -1
- package/dist/providers/zoom.js +5 -4
- package/package.json +1 -4
- package/readme.md +1 -1
|
@@ -26,8 +26,8 @@ export class KeyCloak {
|
|
|
26
26
|
this.tokenRevocationEndpoint = realmURL + "/protocol/openid-connect/revoke";
|
|
27
27
|
this.userinfoEndpoint = realmURL + "/protocol/openid-connect/userinfo";
|
|
28
28
|
}
|
|
29
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
30
|
-
const url = this.client.createAuthorizationURLWithPKCE(this.authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
29
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
30
|
+
const url = await this.client.createAuthorizationURLWithPKCE(this.authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
31
31
|
return url;
|
|
32
32
|
}
|
|
33
33
|
async validateAuthorizationCode(code, codeVerifier) {
|
|
@@ -45,7 +45,7 @@ export class KeyCloak {
|
|
|
45
45
|
const auth = requireAuthConfig(this.auth);
|
|
46
46
|
const state = generateOAuthState();
|
|
47
47
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
48
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
48
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
49
49
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
50
50
|
return url;
|
|
51
51
|
}
|
|
@@ -68,7 +68,8 @@ export class KeyCloak {
|
|
|
68
68
|
id: profileId(claims.sub),
|
|
69
69
|
name: profileString(claims.name) ?? profileString(claims.preferred_username),
|
|
70
70
|
email: profileString(claims.email),
|
|
71
|
-
image: profileString(claims.picture)
|
|
71
|
+
image: profileString(claims.picture),
|
|
72
|
+
raw: claims
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
}
|
package/dist/providers/kick.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare class Kick {
|
|
|
9
9
|
private auth;
|
|
10
10
|
constructor(options: KickOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
12
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
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>;
|
package/dist/providers/kick.js
CHANGED
|
@@ -28,7 +28,7 @@ export class Kick {
|
|
|
28
28
|
this.redirectURI = redirectURI ?? "";
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
31
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
32
32
|
const url = new URL(authorizationEndpoint);
|
|
33
33
|
url.searchParams.set("client_id", this.clientId);
|
|
34
34
|
url.searchParams.set("response_type", "code");
|
|
@@ -37,7 +37,7 @@ export class Kick {
|
|
|
37
37
|
if (scopes.length > 0) {
|
|
38
38
|
url.searchParams.set("scope", scopes.join(" "));
|
|
39
39
|
}
|
|
40
|
-
const codeChallenge = createS256CodeChallenge(codeVerifier);
|
|
40
|
+
const codeChallenge = await createS256CodeChallenge(codeVerifier);
|
|
41
41
|
url.searchParams.set("code_challenge", codeChallenge);
|
|
42
42
|
url.searchParams.set("code_challenge_method", "S256");
|
|
43
43
|
return url;
|
|
@@ -74,7 +74,7 @@ export class Kick {
|
|
|
74
74
|
const auth = requireAuthConfig(this.auth);
|
|
75
75
|
const state = generateOAuthState();
|
|
76
76
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
77
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
77
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
78
78
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
79
79
|
return url;
|
|
80
80
|
}
|
|
@@ -97,7 +97,8 @@ export class Kick {
|
|
|
97
97
|
id: profileId(profile.user_id),
|
|
98
98
|
name: profileString(profile.name),
|
|
99
99
|
email: profileString(profile.email),
|
|
100
|
-
image: profileString(profile.profile_picture)
|
|
100
|
+
image: profileString(profile.profile_picture),
|
|
101
|
+
raw: profile
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
104
|
}
|
|
@@ -7,7 +7,7 @@ export declare class Lichess {
|
|
|
7
7
|
private auth;
|
|
8
8
|
constructor(options: LichessOptions);
|
|
9
9
|
constructor(clientId: string, redirectURI: string);
|
|
10
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
10
|
+
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
11
11
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
12
12
|
getAuthorizationURL(scopes?: string[]): Promise<URL>;
|
|
13
13
|
getUser(query: OAuthCallbackQuery): Promise<OAuthUser>;
|
|
@@ -18,8 +18,8 @@ export class Lichess {
|
|
|
18
18
|
this.client = new OAuth2Client(clientIdOrOptions, null, redirectURI ?? null);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
22
|
-
const url = this.client.createAuthorizationURLWithPKCE(authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
21
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
22
|
+
const url = await this.client.createAuthorizationURLWithPKCE(authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
23
23
|
return url;
|
|
24
24
|
}
|
|
25
25
|
async validateAuthorizationCode(code, codeVerifier) {
|
|
@@ -30,7 +30,7 @@ export class Lichess {
|
|
|
30
30
|
const auth = requireAuthConfig(this.auth);
|
|
31
31
|
const state = generateOAuthState();
|
|
32
32
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
33
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
33
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
34
34
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
35
35
|
return url;
|
|
36
36
|
}
|
|
@@ -57,7 +57,8 @@ export class Lichess {
|
|
|
57
57
|
id: profileId(profile.id),
|
|
58
58
|
name: profileString(profile.username),
|
|
59
59
|
email,
|
|
60
|
-
image: null
|
|
60
|
+
image: null,
|
|
61
|
+
raw: profile
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
}
|
package/dist/providers/line.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare class Line {
|
|
|
9
9
|
private auth;
|
|
10
10
|
constructor(options: LineOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
12
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
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
|
getAuthorizationURL(scopes?: string[]): Promise<URL>;
|
package/dist/providers/line.js
CHANGED
|
@@ -28,7 +28,7 @@ export class Line {
|
|
|
28
28
|
this.redirectURI = redirectURI ?? "";
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
31
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
32
32
|
const url = new URL(authorizationEndpoint);
|
|
33
33
|
url.searchParams.set("response_type", "code");
|
|
34
34
|
url.searchParams.set("client_id", this.clientId);
|
|
@@ -37,7 +37,7 @@ export class Line {
|
|
|
37
37
|
url.searchParams.set("scope", scopes.join(" "));
|
|
38
38
|
}
|
|
39
39
|
url.searchParams.set("redirect_uri", this.redirectURI);
|
|
40
|
-
const codeChallenge = createS256CodeChallenge(codeVerifier);
|
|
40
|
+
const codeChallenge = await createS256CodeChallenge(codeVerifier);
|
|
41
41
|
url.searchParams.set("code_challenge_method", "S256");
|
|
42
42
|
url.searchParams.set("code_challenge", codeChallenge);
|
|
43
43
|
return url;
|
|
@@ -68,7 +68,7 @@ export class Line {
|
|
|
68
68
|
const auth = requireAuthConfig(this.auth);
|
|
69
69
|
const state = generateOAuthState();
|
|
70
70
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
71
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
71
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
72
72
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
73
73
|
return url;
|
|
74
74
|
}
|
|
@@ -92,7 +92,8 @@ export class Line {
|
|
|
92
92
|
id: profileId(claims.sub),
|
|
93
93
|
name: profileString(claims.name),
|
|
94
94
|
email: profileString(claims.email),
|
|
95
|
-
image: profileString(claims.picture)
|
|
95
|
+
image: profileString(claims.picture),
|
|
96
|
+
raw: claims
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
99
|
}
|
package/dist/providers/linear.js
CHANGED
|
@@ -12,7 +12,7 @@ export declare class Mastodon {
|
|
|
12
12
|
private auth;
|
|
13
13
|
constructor(options: MastodonOptions);
|
|
14
14
|
constructor(baseURL: string, clientId: string, clientSecret: string, redirectURI: string);
|
|
15
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
15
|
+
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
16
16
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
17
17
|
revokeToken(token: string): Promise<void>;
|
|
18
18
|
getAuthorizationURL(scopes?: string[]): Promise<URL>;
|
|
@@ -29,8 +29,8 @@ export class Mastodon {
|
|
|
29
29
|
this.tokenRevocationEndpoint = joinURIAndPath(baseURL, "/api/v1/oauth/revoke");
|
|
30
30
|
this.userEndpoint = joinURIAndPath(baseURL, "/api/v1/accounts/verify_credentials");
|
|
31
31
|
}
|
|
32
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
33
|
-
const url = this.client.createAuthorizationURLWithPKCE(this.authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
32
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
33
|
+
const url = await this.client.createAuthorizationURLWithPKCE(this.authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
34
34
|
return url;
|
|
35
35
|
}
|
|
36
36
|
async validateAuthorizationCode(code, codeVerifier) {
|
|
@@ -44,7 +44,7 @@ export class Mastodon {
|
|
|
44
44
|
const auth = requireAuthConfig(this.auth);
|
|
45
45
|
const state = generateOAuthState();
|
|
46
46
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
47
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
47
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
48
48
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
49
49
|
return url;
|
|
50
50
|
}
|
|
@@ -61,7 +61,8 @@ export class Mastodon {
|
|
|
61
61
|
id: profileId(profile.id),
|
|
62
62
|
name: profileString(profile.display_name) ?? profileString(profile.username),
|
|
63
63
|
email: null,
|
|
64
|
-
image: profileString(profile.avatar)
|
|
64
|
+
image: profileString(profile.avatar),
|
|
65
|
+
raw: profile
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
68
|
}
|
|
@@ -9,7 +9,7 @@ export declare class MercadoLibre {
|
|
|
9
9
|
private auth;
|
|
10
10
|
constructor(options: MercadoLibreOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
12
|
-
createAuthorizationURL(state: string, codeVerifier: string): URL
|
|
12
|
+
createAuthorizationURL(state: string, codeVerifier: string): Promise<URL>;
|
|
13
13
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
14
14
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
15
15
|
getAuthorizationURL(_scopes?: string[]): Promise<URL>;
|
|
@@ -27,13 +27,13 @@ export class MercadoLibre {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
// `scopes` not required since they are defined in the application settings
|
|
30
|
-
createAuthorizationURL(state, codeVerifier) {
|
|
30
|
+
async createAuthorizationURL(state, codeVerifier) {
|
|
31
31
|
const url = new URL(authorizationEndpoint);
|
|
32
32
|
url.searchParams.set("response_type", "code");
|
|
33
33
|
url.searchParams.set("client_id", this.clientId);
|
|
34
34
|
url.searchParams.set("redirect_uri", this.redirectURI);
|
|
35
35
|
url.searchParams.set("state", state);
|
|
36
|
-
const codeChallenge = createS256CodeChallenge(codeVerifier);
|
|
36
|
+
const codeChallenge = await createS256CodeChallenge(codeVerifier);
|
|
37
37
|
url.searchParams.set("code_challenge_method", "S256");
|
|
38
38
|
url.searchParams.set("code_challenge", codeChallenge);
|
|
39
39
|
return url;
|
|
@@ -65,7 +65,7 @@ export class MercadoLibre {
|
|
|
65
65
|
const auth = requireAuthConfig(this.auth);
|
|
66
66
|
const state = generateOAuthState();
|
|
67
67
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
68
|
-
const url = this.createAuthorizationURL(state, codeVerifier);
|
|
68
|
+
const url = await this.createAuthorizationURL(state, codeVerifier);
|
|
69
69
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
70
70
|
return url;
|
|
71
71
|
}
|
|
@@ -89,7 +89,8 @@ export class MercadoLibre {
|
|
|
89
89
|
id: profileId(profile.id),
|
|
90
90
|
name: fullName !== "" ? fullName : profileString(profile.nickname),
|
|
91
91
|
email: profileString(profile.email),
|
|
92
|
-
image
|
|
92
|
+
image,
|
|
93
|
+
raw: profile
|
|
93
94
|
};
|
|
94
95
|
}
|
|
95
96
|
}
|
|
@@ -9,7 +9,7 @@ export declare class MercadoPago {
|
|
|
9
9
|
private auth;
|
|
10
10
|
constructor(options: MercadoPagoOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string, redirectURI: string);
|
|
12
|
-
createAuthorizationURL(state: string, codeVerifier: string): URL
|
|
12
|
+
createAuthorizationURL(state: string, codeVerifier: string): Promise<URL>;
|
|
13
13
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
14
14
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
15
15
|
getAuthorizationURL(_scopes?: string[]): Promise<URL>;
|
|
@@ -27,13 +27,13 @@ export class MercadoPago {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
// `scopes` not required since they are defined in the application settings
|
|
30
|
-
createAuthorizationURL(state, codeVerifier) {
|
|
30
|
+
async createAuthorizationURL(state, codeVerifier) {
|
|
31
31
|
const url = new URL(authorizationEndpoint);
|
|
32
32
|
url.searchParams.set("response_type", "code");
|
|
33
33
|
url.searchParams.set("client_id", this.clientId);
|
|
34
34
|
url.searchParams.set("redirect_uri", this.redirectURI);
|
|
35
35
|
url.searchParams.set("state", state);
|
|
36
|
-
const codeChallenge = createS256CodeChallenge(codeVerifier);
|
|
36
|
+
const codeChallenge = await createS256CodeChallenge(codeVerifier);
|
|
37
37
|
url.searchParams.set("code_challenge_method", "S256");
|
|
38
38
|
url.searchParams.set("code_challenge", codeChallenge);
|
|
39
39
|
return url;
|
|
@@ -65,7 +65,7 @@ export class MercadoPago {
|
|
|
65
65
|
const auth = requireAuthConfig(this.auth);
|
|
66
66
|
const state = generateOAuthState();
|
|
67
67
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
68
|
-
const url = this.createAuthorizationURL(state, codeVerifier);
|
|
68
|
+
const url = await this.createAuthorizationURL(state, codeVerifier);
|
|
69
69
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
70
70
|
return url;
|
|
71
71
|
}
|
|
@@ -89,7 +89,8 @@ export class MercadoPago {
|
|
|
89
89
|
id: profileId(profile.id),
|
|
90
90
|
name: fullName !== "" ? fullName : profileString(profile.nickname),
|
|
91
91
|
email: profileString(profile.email),
|
|
92
|
-
image
|
|
92
|
+
image,
|
|
93
|
+
raw: profile
|
|
93
94
|
};
|
|
94
95
|
}
|
|
95
96
|
}
|
|
@@ -12,7 +12,7 @@ export declare class MicrosoftEntraId {
|
|
|
12
12
|
private auth;
|
|
13
13
|
constructor(options: MicrosoftEntraIdOptions);
|
|
14
14
|
constructor(tenant: string, clientId: string, clientSecret: string | null, redirectURI: string);
|
|
15
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
15
|
+
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
16
16
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
17
17
|
refreshAccessToken(refreshToken: string, scopes: string[]): Promise<OAuth2Tokens>;
|
|
18
18
|
getAuthorizationURL(scopes?: string[]): Promise<URL>;
|
|
@@ -30,13 +30,13 @@ export class MicrosoftEntraId {
|
|
|
30
30
|
this.authorizationEndpoint = joinURIAndPath("https://login.microsoftonline.com", tenant, "/oauth2/v2.0/authorize");
|
|
31
31
|
this.tokenEndpoint = joinURIAndPath("https://login.microsoftonline.com", tenant, "/oauth2/v2.0/token");
|
|
32
32
|
}
|
|
33
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
33
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
34
34
|
const url = new URL(this.authorizationEndpoint);
|
|
35
35
|
url.searchParams.set("response_type", "code");
|
|
36
36
|
url.searchParams.set("client_id", this.clientId);
|
|
37
37
|
url.searchParams.set("redirect_uri", this.redirectURI);
|
|
38
38
|
url.searchParams.set("state", state);
|
|
39
|
-
const codeChallenge = createS256CodeChallenge(codeVerifier);
|
|
39
|
+
const codeChallenge = await createS256CodeChallenge(codeVerifier);
|
|
40
40
|
url.searchParams.set("code_challenge_method", "S256");
|
|
41
41
|
url.searchParams.set("code_challenge", codeChallenge);
|
|
42
42
|
if (scopes.length > 0) {
|
|
@@ -91,7 +91,7 @@ export class MicrosoftEntraId {
|
|
|
91
91
|
const auth = requireAuthConfig(this.auth);
|
|
92
92
|
const state = generateOAuthState();
|
|
93
93
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
94
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
94
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
95
95
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
96
96
|
return url;
|
|
97
97
|
}
|
|
@@ -114,7 +114,8 @@ export class MicrosoftEntraId {
|
|
|
114
114
|
id: profileId(claims.sub),
|
|
115
115
|
name: profileString(claims.name),
|
|
116
116
|
email: profileString(claims.email) ?? profileString(claims.preferred_username),
|
|
117
|
-
image: profileString(claims.picture)
|
|
117
|
+
image: profileString(claims.picture),
|
|
118
|
+
raw: claims
|
|
118
119
|
};
|
|
119
120
|
}
|
|
120
121
|
}
|
|
@@ -7,7 +7,7 @@ export declare class MyAnimeList {
|
|
|
7
7
|
private auth;
|
|
8
8
|
constructor(options: MyAnimeListOptions);
|
|
9
9
|
constructor(clientId: string, clientSecret: string, redirectURI: string | null);
|
|
10
|
-
createAuthorizationURL(state: string, codeVerifier: string): URL
|
|
10
|
+
createAuthorizationURL(state: string, codeVerifier: string): Promise<URL>;
|
|
11
11
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
12
12
|
refreshAccessToken(refreshToken: string): Promise<OAuth2Tokens>;
|
|
13
13
|
getAuthorizationURL(_scopes?: string[]): Promise<URL>;
|
|
@@ -16,8 +16,8 @@ export class MyAnimeList {
|
|
|
16
16
|
this.client = new OAuth2Client(clientIdOrOptions, clientSecret ?? null, redirectURI ?? null);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
createAuthorizationURL(state, codeVerifier) {
|
|
20
|
-
const url = this.client.createAuthorizationURLWithPKCE(authorizationEndpoint, state, CodeChallengeMethod.Plain, codeVerifier, []);
|
|
19
|
+
async createAuthorizationURL(state, codeVerifier) {
|
|
20
|
+
const url = await this.client.createAuthorizationURLWithPKCE(authorizationEndpoint, state, CodeChallengeMethod.Plain, codeVerifier, []);
|
|
21
21
|
return url;
|
|
22
22
|
}
|
|
23
23
|
async validateAuthorizationCode(code, codeVerifier) {
|
|
@@ -33,7 +33,7 @@ export class MyAnimeList {
|
|
|
33
33
|
const auth = requireAuthConfig(this.auth);
|
|
34
34
|
const state = generateOAuthState();
|
|
35
35
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
36
|
-
const url = this.createAuthorizationURL(state, codeVerifier);
|
|
36
|
+
const url = await this.createAuthorizationURL(state, codeVerifier);
|
|
37
37
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
38
38
|
return url;
|
|
39
39
|
}
|
|
@@ -50,7 +50,8 @@ export class MyAnimeList {
|
|
|
50
50
|
id: profileId(profile.id),
|
|
51
51
|
name: profileString(profile.name),
|
|
52
52
|
email: null,
|
|
53
|
-
image: profileString(profile.picture)
|
|
53
|
+
image: profileString(profile.picture),
|
|
54
|
+
raw: profile
|
|
54
55
|
};
|
|
55
56
|
}
|
|
56
57
|
}
|
package/dist/providers/naver.js
CHANGED
|
@@ -77,7 +77,8 @@ export class Naver {
|
|
|
77
77
|
id: profileId(user.id),
|
|
78
78
|
name: profileString(user.name) ?? profileString(user.nickname),
|
|
79
79
|
email: profileString(user.email),
|
|
80
|
-
image: profileString(user.profile_image)
|
|
80
|
+
image: profileString(user.profile_image),
|
|
81
|
+
raw: user
|
|
81
82
|
};
|
|
82
83
|
}
|
|
83
84
|
}
|
package/dist/providers/notion.js
CHANGED
package/dist/providers/okta.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare class Okta {
|
|
|
13
13
|
private auth;
|
|
14
14
|
constructor(options: OktaOptions);
|
|
15
15
|
constructor(domain: string, authorizationServerId: string | null, clientId: string, clientSecret: string, redirectURI: string);
|
|
16
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
16
|
+
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): Promise<URL>;
|
|
17
17
|
validateAuthorizationCode(code: string, codeVerifier: string): Promise<OAuth2Tokens>;
|
|
18
18
|
refreshAccessToken(refreshToken: string, scopes: string[]): Promise<OAuth2Tokens>;
|
|
19
19
|
revokeToken(token: string): Promise<void>;
|
package/dist/providers/okta.js
CHANGED
|
@@ -37,8 +37,8 @@ export class Okta {
|
|
|
37
37
|
this.tokenRevocationEndpoint = joinURIAndPath(baseURL, "/v1/revoke");
|
|
38
38
|
this.userinfoEndpoint = joinURIAndPath(baseURL, "/v1/userinfo");
|
|
39
39
|
}
|
|
40
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
41
|
-
const url = this.client.createAuthorizationURLWithPKCE(this.authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
40
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
41
|
+
const url = await this.client.createAuthorizationURLWithPKCE(this.authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
42
42
|
return url;
|
|
43
43
|
}
|
|
44
44
|
async validateAuthorizationCode(code, codeVerifier) {
|
|
@@ -56,7 +56,7 @@ export class Okta {
|
|
|
56
56
|
const auth = requireAuthConfig(this.auth);
|
|
57
57
|
const state = generateOAuthState();
|
|
58
58
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
59
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
59
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
60
60
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
61
61
|
return url;
|
|
62
62
|
}
|
|
@@ -79,7 +79,8 @@ export class Okta {
|
|
|
79
79
|
id: profileId(claims.sub),
|
|
80
80
|
name: profileString(claims.name),
|
|
81
81
|
email: profileString(claims.email),
|
|
82
|
-
image: profileString(claims.picture)
|
|
82
|
+
image: profileString(claims.picture),
|
|
83
|
+
raw: claims
|
|
83
84
|
};
|
|
84
85
|
}
|
|
85
86
|
}
|
package/dist/providers/osu.js
CHANGED
|
@@ -83,7 +83,8 @@ export class Patreon {
|
|
|
83
83
|
id: profileId(user.id),
|
|
84
84
|
name: profileString(attributes.full_name),
|
|
85
85
|
email: profileString(attributes.email),
|
|
86
|
-
image: profileString(attributes.image_url)
|
|
86
|
+
image: profileString(attributes.image_url),
|
|
87
|
+
raw: user
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -9,7 +9,7 @@ export declare class Polar {
|
|
|
9
9
|
private auth;
|
|
10
10
|
constructor(options: PolarOptions);
|
|
11
11
|
constructor(clientId: string, clientSecret: string | null, redirectURI: string);
|
|
12
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
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>;
|
package/dist/providers/polar.js
CHANGED
|
@@ -26,7 +26,7 @@ export class Polar {
|
|
|
26
26
|
this.redirectURI = redirectURI ?? "";
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
29
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
30
30
|
const url = new URL(authorizationEndpoint);
|
|
31
31
|
url.searchParams.set("client_id", this.clientId);
|
|
32
32
|
url.searchParams.set("response_type", "code");
|
|
@@ -35,7 +35,7 @@ export class Polar {
|
|
|
35
35
|
if (scopes.length > 0) {
|
|
36
36
|
url.searchParams.set("scope", scopes.join(" "));
|
|
37
37
|
}
|
|
38
|
-
const codeChallenge = createS256CodeChallenge(codeVerifier);
|
|
38
|
+
const codeChallenge = await createS256CodeChallenge(codeVerifier);
|
|
39
39
|
url.searchParams.set("code_challenge", codeChallenge);
|
|
40
40
|
url.searchParams.set("code_challenge_method", "S256");
|
|
41
41
|
return url;
|
|
@@ -76,7 +76,7 @@ export class Polar {
|
|
|
76
76
|
const auth = requireAuthConfig(this.auth);
|
|
77
77
|
const state = generateOAuthState();
|
|
78
78
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
79
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
79
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
80
80
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
81
81
|
return url;
|
|
82
82
|
}
|
|
@@ -94,7 +94,8 @@ export class Polar {
|
|
|
94
94
|
name: profileString(claims.name),
|
|
95
95
|
email: profileString(claims.email),
|
|
96
96
|
// Polar's userinfo response has no avatar field.
|
|
97
|
-
image: null
|
|
97
|
+
image: null,
|
|
98
|
+
raw: claims
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
}
|
package/dist/providers/reddit.js
CHANGED
|
@@ -7,7 +7,7 @@ export declare class Roblox {
|
|
|
7
7
|
private auth;
|
|
8
8
|
constructor(options: RobloxOptions);
|
|
9
9
|
constructor(clientId: string, clientSecret: string | null, redirectURI: string);
|
|
10
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
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>;
|
package/dist/providers/roblox.js
CHANGED
|
@@ -19,8 +19,8 @@ export class Roblox {
|
|
|
19
19
|
this.client = new OAuth2Client(clientIdOrOptions, clientSecret ?? null, redirectURI ?? null);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
23
|
-
const url = this.client.createAuthorizationURLWithPKCE(authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
22
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
23
|
+
const url = await this.client.createAuthorizationURLWithPKCE(authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
24
24
|
return url;
|
|
25
25
|
}
|
|
26
26
|
async validateAuthorizationCode(code, codeVerifier) {
|
|
@@ -38,7 +38,7 @@ export class Roblox {
|
|
|
38
38
|
const auth = requireAuthConfig(this.auth);
|
|
39
39
|
const state = generateOAuthState();
|
|
40
40
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
41
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
41
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
42
42
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
43
43
|
return url;
|
|
44
44
|
}
|
|
@@ -61,7 +61,8 @@ export class Roblox {
|
|
|
61
61
|
id: profileId(claims.sub),
|
|
62
62
|
name: profileString(claims.name) ?? profileString(claims.preferred_username),
|
|
63
63
|
email: null,
|
|
64
|
-
image: profileString(claims.picture)
|
|
64
|
+
image: profileString(claims.picture),
|
|
65
|
+
raw: claims
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
68
|
}
|
|
@@ -12,7 +12,7 @@ export declare class Salesforce {
|
|
|
12
12
|
private auth;
|
|
13
13
|
constructor(options: SalesforceOptions);
|
|
14
14
|
constructor(domain: string, clientId: string, clientSecret: string | null, redirectURI: string);
|
|
15
|
-
createAuthorizationURL(state: string, codeVerifier: string, scopes: string[]): URL
|
|
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>;
|
|
@@ -26,8 +26,8 @@ export class Salesforce {
|
|
|
26
26
|
this.tokenRevocationEndpoint = `https://${domain}/services/oauth2/revoke`;
|
|
27
27
|
this.userinfoEndpoint = `https://${domain}/services/oauth2/userinfo`;
|
|
28
28
|
}
|
|
29
|
-
createAuthorizationURL(state, codeVerifier, scopes) {
|
|
30
|
-
const url = this.client.createAuthorizationURLWithPKCE(this.authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
29
|
+
async createAuthorizationURL(state, codeVerifier, scopes) {
|
|
30
|
+
const url = await this.client.createAuthorizationURLWithPKCE(this.authorizationEndpoint, state, CodeChallengeMethod.S256, codeVerifier, scopes);
|
|
31
31
|
return url;
|
|
32
32
|
}
|
|
33
33
|
async validateAuthorizationCode(code, codeVerifier) {
|
|
@@ -45,7 +45,7 @@ export class Salesforce {
|
|
|
45
45
|
const auth = requireAuthConfig(this.auth);
|
|
46
46
|
const state = generateOAuthState();
|
|
47
47
|
const codeVerifier = generateOAuthCodeVerifier();
|
|
48
|
-
const url = this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
48
|
+
const url = await this.createAuthorizationURL(state, codeVerifier, resolveScopes(scopes, auth, defaultScopes));
|
|
49
49
|
await saveOAuthState(auth.store, state, { codeVerifier });
|
|
50
50
|
return url;
|
|
51
51
|
}
|
|
@@ -68,7 +68,8 @@ export class Salesforce {
|
|
|
68
68
|
id: profileId(claims.sub),
|
|
69
69
|
name: profileString(claims.name) ?? profileString(claims.preferred_username),
|
|
70
70
|
email: profileString(claims.email),
|
|
71
|
-
image: profileString(claims.picture)
|
|
71
|
+
image: profileString(claims.picture),
|
|
72
|
+
raw: claims
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
}
|