@better-auth/core 1.6.27 → 1.6.29
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/api/index.d.mts +26 -26
- package/dist/async_hooks/index.d.mts +1 -0
- package/dist/async_hooks/pure.index.d.mts +1 -0
- package/dist/context/endpoint-context.d.mts +1 -1
- package/dist/context/global.d.mts +1 -0
- package/dist/context/global.mjs +1 -1
- package/dist/context/request-state.d.mts +1 -0
- package/dist/context/transaction.d.mts +1 -1
- package/dist/db/adapter/factory.d.mts +5 -3
- package/dist/db/adapter/factory.mjs +1 -1
- package/dist/db/adapter/get-default-field-name.d.mts +9 -2
- package/dist/db/adapter/get-default-model-name.d.mts +5 -1
- package/dist/db/adapter/get-field-attributes.d.mts +11 -4
- package/dist/db/adapter/get-field-name.d.mts +9 -2
- package/dist/db/adapter/get-id-field.d.mts +12 -4
- package/dist/db/adapter/get-model-name.d.mts +5 -1
- package/dist/db/adapter/index.d.mts +32 -7
- package/dist/db/adapter/types.d.mts +17 -5
- package/dist/db/adapter/utils.d.mts +1 -0
- package/dist/db/get-tables.d.mts +0 -1
- package/dist/db/plugin.d.mts +2 -1
- package/dist/db/schema/account.d.mts +1 -1
- package/dist/db/schema/rate-limit.d.mts +1 -1
- package/dist/db/schema/session.d.mts +1 -1
- package/dist/db/schema/shared.d.mts +1 -0
- package/dist/db/schema/user.d.mts +1 -1
- package/dist/db/schema/verification.d.mts +1 -1
- package/dist/db/type.d.mts +10 -6
- package/dist/env/logger.d.mts +25 -25
- package/dist/error/codes.d.mts +1 -0
- package/dist/error/index.d.mts +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/instrumentation/attributes.d.mts +1 -0
- package/dist/instrumentation/pure.index.d.mts +1 -0
- package/dist/instrumentation/tracer.mjs +1 -1
- package/dist/oauth2/client-credentials-token.d.mts +20 -4
- package/dist/oauth2/create-authorization-url.d.mts +20 -3
- package/dist/oauth2/oauth-provider.d.mts +0 -1
- package/dist/oauth2/refresh-access-token.d.mts +22 -4
- package/dist/oauth2/reject-redirects.mjs +1 -1
- package/dist/oauth2/utils.d.mts +1 -0
- package/dist/oauth2/validate-authorization-code.d.mts +37 -6
- package/dist/oauth2/verify.d.mts +10 -12
- package/dist/oauth2/verify.mjs +2 -2
- package/dist/social-providers/apple.d.mts +11 -4
- package/dist/social-providers/atlassian.d.mts +11 -3
- package/dist/social-providers/cognito.d.mts +11 -4
- package/dist/social-providers/discord.d.mts +9 -3
- package/dist/social-providers/dropbox.d.mts +11 -3
- package/dist/social-providers/facebook.d.mts +10 -4
- package/dist/social-providers/figma.d.mts +11 -3
- package/dist/social-providers/github.d.mts +12 -3
- package/dist/social-providers/gitlab.d.mts +12 -3
- package/dist/social-providers/google.d.mts +19 -5
- package/dist/social-providers/huggingface.d.mts +11 -3
- package/dist/social-providers/index.d.mts +364 -78
- package/dist/social-providers/kakao.d.mts +9 -3
- package/dist/social-providers/kick.d.mts +11 -3
- package/dist/social-providers/line.d.mts +12 -4
- package/dist/social-providers/linear.d.mts +10 -3
- package/dist/social-providers/linkedin.d.mts +10 -3
- package/dist/social-providers/microsoft-entra-id.d.mts +5 -3
- package/dist/social-providers/microsoft-entra-id.mjs +1 -2
- package/dist/social-providers/naver.d.mts +18 -22
- package/dist/social-providers/notion.d.mts +10 -3
- package/dist/social-providers/paybin.d.mts +12 -3
- package/dist/social-providers/paypal.d.mts +9 -4
- package/dist/social-providers/polar.d.mts +11 -3
- package/dist/social-providers/railway.d.mts +11 -3
- package/dist/social-providers/reddit.d.mts +9 -3
- package/dist/social-providers/roblox.d.mts +9 -3
- package/dist/social-providers/salesforce.d.mts +11 -3
- package/dist/social-providers/slack.d.mts +9 -3
- package/dist/social-providers/spotify.d.mts +11 -3
- package/dist/social-providers/tiktok.d.mts +10 -5
- package/dist/social-providers/twitch.d.mts +9 -3
- package/dist/social-providers/twitter.d.mts +16 -25
- package/dist/social-providers/vercel.d.mts +11 -3
- package/dist/social-providers/vk.d.mts +12 -3
- package/dist/social-providers/wechat.d.mts +8 -3
- package/dist/social-providers/zoom.d.mts +14 -5
- package/dist/types/context.d.mts +1 -2
- package/dist/types/cookie.d.mts +1 -0
- package/dist/types/helper.d.mts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/init-options.d.mts +7 -10
- package/dist/types/plugin-client.d.mts +3 -1
- package/dist/types/plugin.d.mts +2 -2
- package/dist/utils/async.d.mts +1 -0
- package/dist/utils/db.d.mts +0 -1
- package/dist/utils/deprecate.d.mts +1 -0
- package/dist/utils/email.d.mts +4 -1
- package/dist/utils/error-codes.d.mts +2 -2
- package/dist/utils/host.d.mts +1 -27
- package/dist/utils/host.mjs +1 -1
- package/dist/utils/ip.d.mts +0 -1
- package/dist/utils/ip.mjs +1 -1
- package/dist/utils/is-api-error.d.mts +1 -0
- package/dist/utils/redirect-uri.d.mts +1 -0
- package/package.json +2 -2
- package/src/db/type.ts +2 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
|
|
2
|
-
import "../oauth2/index.mjs";
|
|
3
2
|
//#region src/social-providers/gitlab.d.ts
|
|
4
3
|
interface GitlabProfile extends Record<string, any> {
|
|
5
4
|
id: number;
|
|
@@ -53,7 +52,13 @@ interface GitlabOptions extends ProviderOptions<GitlabProfile> {
|
|
|
53
52
|
declare const gitlab: (options: GitlabOptions) => {
|
|
54
53
|
id: "gitlab";
|
|
55
54
|
name: string;
|
|
56
|
-
createAuthorizationURL: ({
|
|
55
|
+
createAuthorizationURL: ({
|
|
56
|
+
state,
|
|
57
|
+
scopes,
|
|
58
|
+
codeVerifier,
|
|
59
|
+
loginHint,
|
|
60
|
+
redirectURI
|
|
61
|
+
}: {
|
|
57
62
|
state: string;
|
|
58
63
|
codeVerifier: string;
|
|
59
64
|
scopes?: string[] | undefined;
|
|
@@ -61,7 +66,11 @@ declare const gitlab: (options: GitlabOptions) => {
|
|
|
61
66
|
display?: string | undefined;
|
|
62
67
|
loginHint?: string | undefined;
|
|
63
68
|
}) => Promise<URL>;
|
|
64
|
-
validateAuthorizationCode: ({
|
|
69
|
+
validateAuthorizationCode: ({
|
|
70
|
+
code,
|
|
71
|
+
redirectURI,
|
|
72
|
+
codeVerifier
|
|
73
|
+
}: {
|
|
65
74
|
code: string;
|
|
66
75
|
redirectURI: string;
|
|
67
76
|
codeVerifier?: string | undefined;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GenericEndpointContext } from "../types/context.mjs";
|
|
2
|
-
import "../types/index.mjs";
|
|
3
2
|
import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
3
|
import { JWTPayload } from "jose";
|
|
4
|
+
|
|
6
5
|
//#region src/social-providers/google.d.ts
|
|
7
6
|
interface GoogleProfile {
|
|
8
7
|
aud: string;
|
|
@@ -59,7 +58,11 @@ interface VerifyGoogleIdTokenOptions {
|
|
|
59
58
|
* Verifies a Google ID token against Google's issuer, audience, signature,
|
|
60
59
|
* expiry, and maximum token age.
|
|
61
60
|
*/
|
|
62
|
-
declare const verifyGoogleIdToken: ({
|
|
61
|
+
declare const verifyGoogleIdToken: ({
|
|
62
|
+
token,
|
|
63
|
+
audience,
|
|
64
|
+
nonce
|
|
65
|
+
}: VerifyGoogleIdTokenOptions) => Promise<JWTPayload | null>;
|
|
63
66
|
/**
|
|
64
67
|
* Checks whether Google's verified `hd` claim satisfies the configured hosted
|
|
65
68
|
* domain restriction. `hd: "*"` accepts any Google Workspace hosted domain.
|
|
@@ -68,7 +71,14 @@ declare const isGoogleHostedDomainAllowed: (configuredHostedDomain: string | und
|
|
|
68
71
|
declare const google: (options: GoogleOptions) => {
|
|
69
72
|
id: "google";
|
|
70
73
|
name: string;
|
|
71
|
-
createAuthorizationURL({
|
|
74
|
+
createAuthorizationURL({
|
|
75
|
+
state,
|
|
76
|
+
scopes,
|
|
77
|
+
codeVerifier,
|
|
78
|
+
redirectURI,
|
|
79
|
+
loginHint,
|
|
80
|
+
display
|
|
81
|
+
}: {
|
|
72
82
|
state: string;
|
|
73
83
|
codeVerifier: string;
|
|
74
84
|
scopes?: string[] | undefined;
|
|
@@ -76,7 +86,11 @@ declare const google: (options: GoogleOptions) => {
|
|
|
76
86
|
display?: string | undefined;
|
|
77
87
|
loginHint?: string | undefined;
|
|
78
88
|
}): Promise<URL>;
|
|
79
|
-
validateAuthorizationCode: ({
|
|
89
|
+
validateAuthorizationCode: ({
|
|
90
|
+
code,
|
|
91
|
+
codeVerifier,
|
|
92
|
+
redirectURI
|
|
93
|
+
}: {
|
|
80
94
|
code: string;
|
|
81
95
|
redirectURI: string;
|
|
82
96
|
codeVerifier?: string | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
|
|
2
|
-
import "../oauth2/index.mjs";
|
|
3
2
|
//#region src/social-providers/huggingface.d.ts
|
|
4
3
|
interface HuggingFaceProfile {
|
|
5
4
|
sub: string;
|
|
@@ -35,7 +34,12 @@ interface HuggingFaceOptions extends ProviderOptions<HuggingFaceProfile> {
|
|
|
35
34
|
declare const huggingface: (options: HuggingFaceOptions) => {
|
|
36
35
|
id: "huggingface";
|
|
37
36
|
name: string;
|
|
38
|
-
createAuthorizationURL({
|
|
37
|
+
createAuthorizationURL({
|
|
38
|
+
state,
|
|
39
|
+
scopes,
|
|
40
|
+
codeVerifier,
|
|
41
|
+
redirectURI
|
|
42
|
+
}: {
|
|
39
43
|
state: string;
|
|
40
44
|
codeVerifier: string;
|
|
41
45
|
scopes?: string[] | undefined;
|
|
@@ -43,7 +47,11 @@ declare const huggingface: (options: HuggingFaceOptions) => {
|
|
|
43
47
|
display?: string | undefined;
|
|
44
48
|
loginHint?: string | undefined;
|
|
45
49
|
}): Promise<URL>;
|
|
46
|
-
validateAuthorizationCode: ({
|
|
50
|
+
validateAuthorizationCode: ({
|
|
51
|
+
code,
|
|
52
|
+
codeVerifier,
|
|
53
|
+
redirectURI
|
|
54
|
+
}: {
|
|
47
55
|
code: string;
|
|
48
56
|
redirectURI: string;
|
|
49
57
|
codeVerifier?: string | undefined;
|