@better-auth/core 1.4.2-beta.4 → 1.4.2
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/.turbo/turbo-build.log +7 -7
- package/dist/api/index.d.mts +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/db/adapter/index.d.mts +1 -1
- package/dist/db/index.d.mts +1 -1
- package/dist/{index-CkAWdKH8.d.mts → index-BlxTbL2l.d.mts} +4 -0
- package/dist/index.d.mts +1 -1
- package/dist/oauth2/index.d.mts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.mjs +4 -2
- package/package.json +2 -7
- package/src/social-providers/github.ts +10 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
> @better-auth/core@1.4.2
|
|
2
|
+
> @better-auth/core@1.4.2 build /home/runner/work/better-auth/better-auth/packages/core
|
|
3
3
|
> tsdown
|
|
4
4
|
|
|
5
|
-
[34mℹ[39m tsdown [2mv0.16.
|
|
5
|
+
[34mℹ[39m tsdown [2mv0.16.5[22m powered by rolldown [2mv1.0.0-beta.50[22m
|
|
6
6
|
[34mℹ[39m Using tsdown config: [4m/home/runner/work/better-auth/better-auth/packages/core/tsdown.config.ts[24m
|
|
7
7
|
[34mℹ[39m entry: [34msrc/index.ts, src/db/index.ts, src/db/adapter/index.ts, src/async_hooks/index.ts, src/context/index.ts, src/env/index.ts, src/oauth2/index.ts, src/api/index.ts, src/social-providers/index.ts, src/utils/index.ts, src/error/index.ts[39m
|
|
8
8
|
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
9
9
|
[34mℹ[39m Build start
|
|
10
|
-
[34mℹ[39m [2mdist/[22m[1msocial-providers/index.mjs[22m [2m 78.
|
|
10
|
+
[34mℹ[39m [2mdist/[22m[1msocial-providers/index.mjs[22m [2m 78.27 kB[22m [2m│ gzip: 10.18 kB[22m
|
|
11
11
|
[34mℹ[39m [2mdist/[22m[1mdb/index.mjs[22m [2m 1.58 kB[22m [2m│ gzip: 0.49 kB[22m
|
|
12
12
|
[34mℹ[39m [2mdist/[22m[1mapi/index.mjs[22m [2m 0.83 kB[22m [2m│ gzip: 0.40 kB[22m
|
|
13
13
|
[34mℹ[39m [2mdist/[22m[1mcontext/index.mjs[22m [2m 0.74 kB[22m [2m│ gzip: 0.27 kB[22m
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
[34mℹ[39m [2mdist/[22m[32m[1mutils/index.d.mts[22m[39m [2m 0.84 kB[22m [2m│ gzip: 0.43 kB[22m
|
|
33
33
|
[34mℹ[39m [2mdist/[22m[32m[1moauth2/index.d.mts[22m[39m [2m 0.79 kB[22m [2m│ gzip: 0.30 kB[22m
|
|
34
34
|
[34mℹ[39m [2mdist/[22m[32m[1menv/index.d.mts[22m[39m [2m 0.59 kB[22m [2m│ gzip: 0.30 kB[22m
|
|
35
|
-
[34mℹ[39m [2mdist/[22m[32m[1mdb/adapter/index.d.mts[22m[39m [2m 0.53 kB[22m [2m│ gzip: 0.
|
|
35
|
+
[34mℹ[39m [2mdist/[22m[32m[1mdb/adapter/index.d.mts[22m[39m [2m 0.53 kB[22m [2m│ gzip: 0.25 kB[22m
|
|
36
36
|
[34mℹ[39m [2mdist/[22m[32m[1mapi/index.d.mts[22m[39m [2m 0.29 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
37
37
|
[34mℹ[39m [2mdist/[22m[32m[1masync_hooks/index.d.mts[22m[39m [2m 0.14 kB[22m [2m│ gzip: 0.10 kB[22m
|
|
38
|
-
[34mℹ[39m [2mdist/[22m[32mindex-
|
|
38
|
+
[34mℹ[39m [2mdist/[22m[32mindex-BlxTbL2l.d.mts[39m [2m205.91 kB[22m [2m│ gzip: 32.51 kB[22m
|
|
39
39
|
[34mℹ[39m [2mdist/[22m[32mindex-CdubV7uy.d.mts[39m [2m 3.31 kB[22m [2m│ gzip: 1.11 kB[22m
|
|
40
40
|
[34mℹ[39m [2mdist/[22m[32mindex-DgwIISs7.d.mts[39m [2m 0.24 kB[22m [2m│ gzip: 0.16 kB[22m
|
|
41
|
-
[34mℹ[39m 31 files, total: 329.
|
|
42
|
-
[32m✔[39m Build complete in [
|
|
41
|
+
[34mℹ[39m 31 files, total: 329.56 kB
|
|
42
|
+
[32m✔[39m Build complete in [32m4669ms[39m
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as optionsMiddleware, i as createAuthMiddleware, n as AuthMiddleware, r as createAuthEndpoint, t as AuthEndpoint } from "../index-
|
|
1
|
+
import { a as optionsMiddleware, i as createAuthMiddleware, n as AuthMiddleware, r as createAuthEndpoint, t as AuthEndpoint } from "../index-BlxTbL2l.mjs";
|
|
2
2
|
import "../index-CdubV7uy.mjs";
|
|
3
3
|
export { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware };
|
package/dist/context/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Wn as DBAdapter, Yn as DBTransactionAdapter, f as AuthContext } from "../index-
|
|
1
|
+
import { Wn as DBAdapter, Yn as DBTransactionAdapter, f as AuthContext } from "../index-BlxTbL2l.mjs";
|
|
2
2
|
import "../index-CdubV7uy.mjs";
|
|
3
3
|
import { t as AsyncLocalStorage } from "../index-DgwIISs7.mjs";
|
|
4
4
|
import { EndpointContext, InputContext } from "better-call";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Gn as DBAdapterDebugLogOption, Hn as CleanedWhere, Jn as DBAdapterSchemaCreation, Kn as DBAdapterFactoryConfig, Qn as Where, Un as CustomAdapter, Wn as DBAdapter, Xn as JoinConfig, Yn as DBTransactionAdapter, Zn as JoinOption, qn as DBAdapterInstance } from "../../index-
|
|
1
|
+
import { Gn as DBAdapterDebugLogOption, Hn as CleanedWhere, Jn as DBAdapterSchemaCreation, Kn as DBAdapterFactoryConfig, Qn as Where, Un as CustomAdapter, Wn as DBAdapter, Xn as JoinConfig, Yn as DBTransactionAdapter, Zn as JoinOption, qn as DBAdapterInstance } from "../../index-BlxTbL2l.mjs";
|
|
2
2
|
import "../../index-CdubV7uy.mjs";
|
|
3
3
|
export { CleanedWhere, CustomAdapter, DBAdapter, DBAdapterDebugLogOption, DBAdapterFactoryConfig, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, JoinConfig, JoinOption, Where };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $n as AuthPluginSchema, Cr as SecondaryStorage, Sr as DBPrimitive, _r as BetterAuthDBSchema, ar as Verification, br as DBFieldType, cr as userSchema, dr as sessionSchema, er as BetterAuthDbSchema, fr as RateLimit, gr as BetterAuthPluginDBSchema, hr as accountSchema, ir as Primitive, lr as coreSchema, mr as Account, nr as FieldAttributeConfig, or as verificationSchema, pr as rateLimitSchema, rr as FieldType, sr as User, tr as FieldAttribute, ur as Session, vr as DBFieldAttribute, xr as DBPreservedModels, yr as DBFieldAttributeConfig } from "../index-
|
|
1
|
+
import { $n as AuthPluginSchema, Cr as SecondaryStorage, Sr as DBPrimitive, _r as BetterAuthDBSchema, ar as Verification, br as DBFieldType, cr as userSchema, dr as sessionSchema, er as BetterAuthDbSchema, fr as RateLimit, gr as BetterAuthPluginDBSchema, hr as accountSchema, ir as Primitive, lr as coreSchema, mr as Account, nr as FieldAttributeConfig, or as verificationSchema, pr as rateLimitSchema, rr as FieldType, sr as User, tr as FieldAttribute, ur as Session, vr as DBFieldAttribute, xr as DBPreservedModels, yr as DBFieldAttributeConfig } from "../index-BlxTbL2l.mjs";
|
|
2
2
|
import "../index-CdubV7uy.mjs";
|
|
3
3
|
export { Account, AuthPluginSchema, BetterAuthDBSchema, BetterAuthDbSchema, BetterAuthPluginDBSchema, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPreservedModels, DBPrimitive, FieldAttribute, FieldAttributeConfig, FieldType, Primitive, RateLimit, SecondaryStorage, Session, User, Verification, accountSchema, coreSchema, rateLimitSchema, sessionSchema, userSchema, verificationSchema };
|
|
@@ -1717,6 +1717,7 @@ declare const github: (options: GithubOptions) => {
|
|
|
1717
1717
|
state,
|
|
1718
1718
|
scopes,
|
|
1719
1719
|
loginHint,
|
|
1720
|
+
codeVerifier,
|
|
1720
1721
|
redirectURI
|
|
1721
1722
|
}: {
|
|
1722
1723
|
state: string;
|
|
@@ -1728,6 +1729,7 @@ declare const github: (options: GithubOptions) => {
|
|
|
1728
1729
|
}): Promise<URL>;
|
|
1729
1730
|
validateAuthorizationCode: ({
|
|
1730
1731
|
code,
|
|
1732
|
+
codeVerifier,
|
|
1731
1733
|
redirectURI
|
|
1732
1734
|
}: {
|
|
1733
1735
|
code: string;
|
|
@@ -4453,6 +4455,7 @@ declare const socialProviders: {
|
|
|
4453
4455
|
state,
|
|
4454
4456
|
scopes,
|
|
4455
4457
|
loginHint,
|
|
4458
|
+
codeVerifier,
|
|
4456
4459
|
redirectURI
|
|
4457
4460
|
}: {
|
|
4458
4461
|
state: string;
|
|
@@ -4464,6 +4467,7 @@ declare const socialProviders: {
|
|
|
4464
4467
|
}): Promise<URL>;
|
|
4465
4468
|
validateAuthorizationCode: ({
|
|
4466
4469
|
code,
|
|
4470
|
+
codeVerifier,
|
|
4467
4471
|
redirectURI
|
|
4468
4472
|
}: {
|
|
4469
4473
|
code: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Dn as BetterAuthCookies, En as LiteralUnion, Tn as LiteralString, _ as BetterAuthRateLimitOptions, b as HookEndpointContext, c as BetterAuthClientPlugin, d as ClientStore, f as AuthContext, g as BetterAuthOptions, h as BetterAuthAdvancedOptions, l as ClientAtomListener, m as InternalAdapter, o as StandardSchemaV1, p as GenericEndpointContext, s as BetterAuthClientOptions, u as ClientFetchOption, v as GenerateIdFn, y as BetterAuthPlugin } from "./index-
|
|
1
|
+
import { Dn as BetterAuthCookies, En as LiteralUnion, Tn as LiteralString, _ as BetterAuthRateLimitOptions, b as HookEndpointContext, c as BetterAuthClientPlugin, d as ClientStore, f as AuthContext, g as BetterAuthOptions, h as BetterAuthAdvancedOptions, l as ClientAtomListener, m as InternalAdapter, o as StandardSchemaV1, p as GenericEndpointContext, s as BetterAuthClientOptions, u as ClientFetchOption, v as GenerateIdFn, y as BetterAuthPlugin } from "./index-BlxTbL2l.mjs";
|
|
2
2
|
import "./index-CdubV7uy.mjs";
|
|
3
3
|
export { AuthContext, BetterAuthAdvancedOptions, BetterAuthClientOptions, BetterAuthClientPlugin, BetterAuthCookies, BetterAuthOptions, BetterAuthPlugin, BetterAuthRateLimitOptions, ClientAtomListener, ClientFetchOption, ClientStore, GenerateIdFn, GenericEndpointContext, HookEndpointContext, InternalAdapter, LiteralString, LiteralUnion, StandardSchemaV1 };
|
package/dist/oauth2/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { An as validateToken, Bn as OAuthProvider, Fn as createAuthorizationURL, In as clientCredentialsToken, Ln as createClientCredentialsTokenRequest, Mn as getOAuth2Tokens, Nn as createRefreshAccessTokenRequest, On as createAuthorizationCodeRequest, Pn as refreshAccessToken, Rn as OAuth2Tokens, Vn as ProviderOptions, jn as generateCodeChallenge, kn as validateAuthorizationCode, zn as OAuth2UserInfo } from "../index-
|
|
1
|
+
import { An as validateToken, Bn as OAuthProvider, Fn as createAuthorizationURL, In as clientCredentialsToken, Ln as createClientCredentialsTokenRequest, Mn as getOAuth2Tokens, Nn as createRefreshAccessTokenRequest, On as createAuthorizationCodeRequest, Pn as refreshAccessToken, Rn as OAuth2Tokens, Vn as ProviderOptions, jn as generateCodeChallenge, kn as validateAuthorizationCode, zn as OAuth2UserInfo } from "../index-BlxTbL2l.mjs";
|
|
2
2
|
import "../index-CdubV7uy.mjs";
|
|
3
3
|
export { OAuth2Tokens, OAuth2UserInfo, OAuthProvider, ProviderOptions, clientCredentialsToken, createAuthorizationCodeRequest, createAuthorizationURL, createClientCredentialsTokenRequest, createRefreshAccessTokenRequest, generateCodeChallenge, getOAuth2Tokens, refreshAccessToken, validateAuthorizationCode, validateToken };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as PronounOption, $t as MicrosoftOptions, A as PayPalOptions, At as kick, B as line, Bt as SpotifyOptions, C as SocialProviderListEnum, Cn as apple, Ct as linkedin, D as PolarOptions, Dt as linear, E as socialProviders, Et as LinearUser, F as PaybinProfile, Ft as TwitterProfile, G as KakaoProfile, Gt as slack, H as NaverProfile, Ht as spotify, I as paybin, It as twitter, J as NotionProfile, Jt as huggingface, K as kakao, Kt as HuggingFaceOptions, L as LineIdTokenPayload, Lt as TwitchOptions, M as PayPalTokenResponse, Mt as DropboxProfile, N as paypal, Nt as dropbox, O as PolarProfile, Ot as KickOptions, P as PaybinOptions, Pt as TwitterOption, Q as PhoneNumber, Qt as MicrosoftEntraIDProfile, R as LineOptions, Rt as TwitchProfile, S as SocialProviderList, Sn as AppleProfile, St as LinkedInProfile, T as socialProviderList, Tt as LinearProfile, U as naver, Ut as SlackOptions, V as NaverOptions, Vt as SpotifyProfile, W as KakaoOptions, Wt as SlackProfile, X as AccountStatus, Xt as GoogleProfile, Y as notion, Yt as GoogleOptions, Z as LoginType, Zt as google, _n as AtlassianOptions, _t as tiktok, an as FigmaProfile, at as vk, bn as AppleNonConformUser, bt as gitlab, cn as FacebookProfile, ct as salesforce, dn as DiscordProfile, dt as roblox, en as microsoft, et as ZoomOptions, fn as discord, ft as RedditOptions, gn as getCognitoPublicKey, gt as TiktokProfile, hn as cognito, ht as TiktokOptions, in as FigmaOptions, it as VkProfile, j as PayPalProfile, jt as DropboxOptions, k as polar, kt as KickProfile, ln as facebook, lt as RobloxOptions, mn as CognitoProfile, mt as reddit, nn as GithubProfile, nt as zoom, on as figma, ot as SalesforceOptions, pn as CognitoOptions, pt as RedditProfile, q as NotionOptions, qt as HuggingFaceProfile, rn as github, rt as VkOption, sn as FacebookOptions, st as SalesforceProfile, tn as GithubOptions, tt as ZoomProfile, un as DiscordOptions, ut as RobloxProfile, vn as AtlassianProfile, vt as GitlabOptions, w as SocialProviders, wn as getApplePublicKey, wt as LinearOptions, x as SocialProvider, xn as AppleOptions, xt as LinkedInOptions, yn as atlassian, yt as GitlabProfile, z as LineUserInfo, zt as twitch } from "../index-
|
|
1
|
+
import { $ as PronounOption, $t as MicrosoftOptions, A as PayPalOptions, At as kick, B as line, Bt as SpotifyOptions, C as SocialProviderListEnum, Cn as apple, Ct as linkedin, D as PolarOptions, Dt as linear, E as socialProviders, Et as LinearUser, F as PaybinProfile, Ft as TwitterProfile, G as KakaoProfile, Gt as slack, H as NaverProfile, Ht as spotify, I as paybin, It as twitter, J as NotionProfile, Jt as huggingface, K as kakao, Kt as HuggingFaceOptions, L as LineIdTokenPayload, Lt as TwitchOptions, M as PayPalTokenResponse, Mt as DropboxProfile, N as paypal, Nt as dropbox, O as PolarProfile, Ot as KickOptions, P as PaybinOptions, Pt as TwitterOption, Q as PhoneNumber, Qt as MicrosoftEntraIDProfile, R as LineOptions, Rt as TwitchProfile, S as SocialProviderList, Sn as AppleProfile, St as LinkedInProfile, T as socialProviderList, Tt as LinearProfile, U as naver, Ut as SlackOptions, V as NaverOptions, Vt as SpotifyProfile, W as KakaoOptions, Wt as SlackProfile, X as AccountStatus, Xt as GoogleProfile, Y as notion, Yt as GoogleOptions, Z as LoginType, Zt as google, _n as AtlassianOptions, _t as tiktok, an as FigmaProfile, at as vk, bn as AppleNonConformUser, bt as gitlab, cn as FacebookProfile, ct as salesforce, dn as DiscordProfile, dt as roblox, en as microsoft, et as ZoomOptions, fn as discord, ft as RedditOptions, gn as getCognitoPublicKey, gt as TiktokProfile, hn as cognito, ht as TiktokOptions, in as FigmaOptions, it as VkProfile, j as PayPalProfile, jt as DropboxOptions, k as polar, kt as KickProfile, ln as facebook, lt as RobloxOptions, mn as CognitoProfile, mt as reddit, nn as GithubProfile, nt as zoom, on as figma, ot as SalesforceOptions, pn as CognitoOptions, pt as RedditProfile, q as NotionOptions, qt as HuggingFaceProfile, rn as github, rt as VkOption, sn as FacebookOptions, st as SalesforceProfile, tn as GithubOptions, tt as ZoomProfile, un as DiscordOptions, ut as RobloxProfile, vn as AtlassianProfile, vt as GitlabOptions, w as SocialProviders, wn as getApplePublicKey, wt as LinearOptions, x as SocialProvider, xn as AppleOptions, xt as LinkedInOptions, yn as atlassian, yt as GitlabProfile, z as LineUserInfo, zt as twitch } from "../index-BlxTbL2l.mjs";
|
|
2
2
|
import "../index-CdubV7uy.mjs";
|
|
3
3
|
export { AccountStatus, AppleNonConformUser, AppleOptions, AppleProfile, AtlassianOptions, AtlassianProfile, CognitoOptions, CognitoProfile, DiscordOptions, DiscordProfile, DropboxOptions, DropboxProfile, FacebookOptions, FacebookProfile, FigmaOptions, FigmaProfile, GithubOptions, GithubProfile, GitlabOptions, GitlabProfile, GoogleOptions, GoogleProfile, HuggingFaceOptions, HuggingFaceProfile, KakaoOptions, KakaoProfile, KickOptions, KickProfile, LineIdTokenPayload, LineOptions, LineUserInfo, LinearOptions, LinearProfile, LinearUser, LinkedInOptions, LinkedInProfile, LoginType, MicrosoftEntraIDProfile, MicrosoftOptions, NaverOptions, NaverProfile, NotionOptions, NotionProfile, PayPalOptions, PayPalProfile, PayPalTokenResponse, PaybinOptions, PaybinProfile, PhoneNumber, PolarOptions, PolarProfile, PronounOption, RedditOptions, RedditProfile, RobloxOptions, RobloxProfile, SalesforceOptions, SalesforceProfile, SlackOptions, SlackProfile, SocialProvider, SocialProviderList, SocialProviderListEnum, SocialProviders, SpotifyOptions, SpotifyProfile, TiktokOptions, TiktokProfile, TwitchOptions, TwitchProfile, TwitterOption, TwitterProfile, VkOption, VkProfile, ZoomOptions, ZoomProfile, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, github, gitlab, google, huggingface, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paybin, paypal, polar, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vk, zoom };
|
|
@@ -637,7 +637,7 @@ const github = (options) => {
|
|
|
637
637
|
return {
|
|
638
638
|
id: "github",
|
|
639
639
|
name: "GitHub",
|
|
640
|
-
createAuthorizationURL({ state, scopes, loginHint, redirectURI }) {
|
|
640
|
+
createAuthorizationURL({ state, scopes, loginHint, codeVerifier, redirectURI }) {
|
|
641
641
|
const _scopes = options.disableDefaultScope ? [] : ["read:user", "user:email"];
|
|
642
642
|
if (options.scope) _scopes.push(...options.scope);
|
|
643
643
|
if (scopes) _scopes.push(...scopes);
|
|
@@ -647,14 +647,16 @@ const github = (options) => {
|
|
|
647
647
|
authorizationEndpoint: "https://github.com/login/oauth/authorize",
|
|
648
648
|
scopes: _scopes,
|
|
649
649
|
state,
|
|
650
|
+
codeVerifier,
|
|
650
651
|
redirectURI,
|
|
651
652
|
loginHint,
|
|
652
653
|
prompt: options.prompt
|
|
653
654
|
});
|
|
654
655
|
},
|
|
655
|
-
validateAuthorizationCode: async ({ code, redirectURI }) => {
|
|
656
|
+
validateAuthorizationCode: async ({ code, codeVerifier, redirectURI }) => {
|
|
656
657
|
return validateAuthorizationCode({
|
|
657
658
|
code,
|
|
659
|
+
codeVerifier,
|
|
658
660
|
redirectURI,
|
|
659
661
|
options,
|
|
660
662
|
tokenEndpoint
|
package/package.json
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/core",
|
|
3
|
-
"version": "1.4.2
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "The most comprehensive authentication framework for TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "https://github.com/better-auth/better-auth",
|
|
9
|
-
"directory": "packages/core"
|
|
10
|
-
},
|
|
11
6
|
"main": "./dist/index.mjs",
|
|
12
7
|
"module": "./dist/index.mjs",
|
|
13
8
|
"exports": {
|
|
@@ -113,7 +108,7 @@
|
|
|
113
108
|
"jose": "^6.1.0",
|
|
114
109
|
"kysely": "^0.28.5",
|
|
115
110
|
"nanostores": "^1.0.1",
|
|
116
|
-
"tsdown": "^0.16.
|
|
111
|
+
"tsdown": "^0.16.0"
|
|
117
112
|
},
|
|
118
113
|
"dependencies": {
|
|
119
114
|
"@standard-schema/spec": "^1.0.0",
|
|
@@ -61,7 +61,13 @@ export const github = (options: GithubOptions) => {
|
|
|
61
61
|
return {
|
|
62
62
|
id: "github",
|
|
63
63
|
name: "GitHub",
|
|
64
|
-
createAuthorizationURL({
|
|
64
|
+
createAuthorizationURL({
|
|
65
|
+
state,
|
|
66
|
+
scopes,
|
|
67
|
+
loginHint,
|
|
68
|
+
codeVerifier,
|
|
69
|
+
redirectURI,
|
|
70
|
+
}) {
|
|
65
71
|
const _scopes = options.disableDefaultScope
|
|
66
72
|
? []
|
|
67
73
|
: ["read:user", "user:email"];
|
|
@@ -73,14 +79,16 @@ export const github = (options: GithubOptions) => {
|
|
|
73
79
|
authorizationEndpoint: "https://github.com/login/oauth/authorize",
|
|
74
80
|
scopes: _scopes,
|
|
75
81
|
state,
|
|
82
|
+
codeVerifier,
|
|
76
83
|
redirectURI,
|
|
77
84
|
loginHint,
|
|
78
85
|
prompt: options.prompt,
|
|
79
86
|
});
|
|
80
87
|
},
|
|
81
|
-
validateAuthorizationCode: async ({ code, redirectURI }) => {
|
|
88
|
+
validateAuthorizationCode: async ({ code, codeVerifier, redirectURI }) => {
|
|
82
89
|
return validateAuthorizationCode({
|
|
83
90
|
code,
|
|
91
|
+
codeVerifier,
|
|
84
92
|
redirectURI,
|
|
85
93
|
options,
|
|
86
94
|
tokenEndpoint,
|