better-auth 1.2.6-beta.7 → 1.2.7-beta.1
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/adapters/drizzle-adapter/index.cjs +186 -249
- package/dist/adapters/drizzle-adapter/index.d.cts +11 -49
- package/dist/adapters/drizzle-adapter/index.d.mts +11 -49
- package/dist/adapters/drizzle-adapter/index.d.ts +11 -49
- package/dist/adapters/drizzle-adapter/index.mjs +186 -249
- package/dist/adapters/index.cjs +26 -0
- package/dist/adapters/index.d.cts +17 -0
- package/dist/adapters/index.d.mts +17 -0
- package/dist/adapters/index.d.ts +17 -0
- package/dist/adapters/index.mjs +20 -0
- package/dist/adapters/kysely-adapter/index.cjs +7 -7
- package/dist/adapters/kysely-adapter/index.d.cts +17 -49
- package/dist/adapters/kysely-adapter/index.d.mts +17 -49
- package/dist/adapters/kysely-adapter/index.d.ts +17 -49
- package/dist/adapters/kysely-adapter/index.mjs +8 -8
- package/dist/adapters/memory-adapter/index.cjs +7 -8
- package/dist/adapters/memory-adapter/index.d.cts +9 -49
- package/dist/adapters/memory-adapter/index.d.mts +9 -49
- package/dist/adapters/memory-adapter/index.d.ts +9 -49
- package/dist/adapters/memory-adapter/index.mjs +8 -9
- package/dist/adapters/mongodb-adapter/index.cjs +2 -2
- package/dist/adapters/mongodb-adapter/index.d.cts +4 -4
- package/dist/adapters/mongodb-adapter/index.d.mts +4 -4
- package/dist/adapters/mongodb-adapter/index.d.ts +4 -4
- package/dist/adapters/mongodb-adapter/index.mjs +3 -3
- package/dist/adapters/prisma-adapter/index.cjs +130 -203
- package/dist/adapters/prisma-adapter/index.d.cts +17 -49
- package/dist/adapters/prisma-adapter/index.d.mts +17 -49
- package/dist/adapters/prisma-adapter/index.d.ts +17 -49
- package/dist/adapters/prisma-adapter/index.mjs +131 -204
- package/dist/adapters/test.cjs +710 -377
- package/dist/adapters/test.d.cts +64 -5
- package/dist/adapters/test.d.mts +64 -5
- package/dist/adapters/test.d.ts +64 -5
- package/dist/adapters/test.mjs +712 -380
- package/dist/api/index.cjs +61 -25
- package/dist/api/index.d.cts +3 -3
- package/dist/api/index.d.mts +3 -3
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.mjs +63 -27
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.mts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/plugins/index.cjs +13 -15
- package/dist/client/plugins/index.d.cts +80 -19
- package/dist/client/plugins/index.d.mts +80 -19
- package/dist/client/plugins/index.d.ts +80 -19
- package/dist/client/plugins/index.mjs +13 -16
- package/dist/client/react/index.cjs +4 -4
- package/dist/client/react/index.d.cts +3 -3
- package/dist/client/react/index.d.mts +3 -3
- package/dist/client/react/index.d.ts +3 -3
- package/dist/client/solid/index.d.cts +3 -3
- package/dist/client/solid/index.d.mts +3 -3
- package/dist/client/solid/index.d.ts +3 -3
- package/dist/client/svelte/index.d.cts +3 -3
- package/dist/client/svelte/index.d.mts +3 -3
- package/dist/client/svelte/index.d.ts +3 -3
- package/dist/client/vue/index.d.cts +3 -3
- package/dist/client/vue/index.d.mts +3 -3
- package/dist/client/vue/index.d.ts +3 -3
- package/dist/cookies/index.cjs +13 -2
- package/dist/cookies/index.d.cts +3 -3
- package/dist/cookies/index.d.mts +3 -3
- package/dist/cookies/index.d.ts +3 -3
- package/dist/cookies/index.mjs +13 -2
- package/dist/db/index.cjs +6 -5
- package/dist/db/index.d.cts +4 -4
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.d.ts +4 -4
- package/dist/db/index.mjs +7 -6
- package/dist/index.cjs +11 -7
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +14 -10
- package/dist/integrations/next-js.cjs +4 -5
- package/dist/integrations/next-js.d.cts +3 -3
- package/dist/integrations/next-js.d.mts +3 -3
- package/dist/integrations/next-js.d.ts +3 -3
- package/dist/integrations/next-js.mjs +5 -6
- package/dist/integrations/node.d.cts +3 -3
- package/dist/integrations/node.d.mts +3 -3
- package/dist/integrations/node.d.ts +3 -3
- package/dist/integrations/react-start.cjs +5 -6
- package/dist/integrations/react-start.d.cts +3 -3
- package/dist/integrations/react-start.d.mts +3 -3
- package/dist/integrations/react-start.d.ts +3 -3
- package/dist/integrations/react-start.mjs +6 -7
- package/dist/integrations/svelte-kit.d.cts +3 -3
- package/dist/integrations/svelte-kit.d.mts +3 -3
- package/dist/integrations/svelte-kit.d.ts +3 -3
- package/dist/oauth2/index.d.cts +5 -5
- package/dist/oauth2/index.d.mts +5 -5
- package/dist/oauth2/index.d.ts +5 -5
- package/dist/plugins/access/index.d.cts +1 -1
- package/dist/plugins/access/index.d.mts +1 -1
- package/dist/plugins/access/index.d.ts +1 -1
- package/dist/plugins/admin/access/index.d.cts +1 -1
- package/dist/plugins/admin/access/index.d.mts +1 -1
- package/dist/plugins/admin/access/index.d.ts +1 -1
- package/dist/plugins/admin/index.cjs +4 -4
- package/dist/plugins/admin/index.d.cts +74 -14
- package/dist/plugins/admin/index.d.mts +74 -14
- package/dist/plugins/admin/index.d.ts +74 -14
- package/dist/plugins/admin/index.mjs +5 -5
- package/dist/plugins/anonymous/index.cjs +4 -5
- package/dist/plugins/anonymous/index.d.cts +3 -3
- package/dist/plugins/anonymous/index.d.mts +3 -3
- package/dist/plugins/anonymous/index.d.ts +3 -3
- package/dist/plugins/anonymous/index.mjs +5 -6
- package/dist/plugins/bearer/index.cjs +2 -2
- package/dist/plugins/bearer/index.d.cts +3 -3
- package/dist/plugins/bearer/index.d.mts +3 -3
- package/dist/plugins/bearer/index.d.ts +3 -3
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/captcha/index.cjs +110 -45
- package/dist/plugins/captcha/index.d.cts +26 -6
- package/dist/plugins/captcha/index.d.mts +26 -6
- package/dist/plugins/captcha/index.d.ts +26 -6
- package/dist/plugins/captcha/index.mjs +110 -45
- package/dist/plugins/custom-session/index.cjs +24 -5
- package/dist/plugins/custom-session/index.d.cts +25 -6
- package/dist/plugins/custom-session/index.d.mts +25 -6
- package/dist/plugins/custom-session/index.d.ts +25 -6
- package/dist/plugins/custom-session/index.mjs +25 -6
- package/dist/plugins/email-otp/index.cjs +96 -30
- package/dist/plugins/email-otp/index.d.cts +33 -10
- package/dist/plugins/email-otp/index.d.mts +33 -10
- package/dist/plugins/email-otp/index.d.ts +33 -10
- package/dist/plugins/email-otp/index.mjs +97 -31
- package/dist/plugins/generic-oauth/index.cjs +81 -20
- package/dist/plugins/generic-oauth/index.d.cts +46 -3
- package/dist/plugins/generic-oauth/index.d.mts +46 -3
- package/dist/plugins/generic-oauth/index.d.ts +46 -3
- package/dist/plugins/generic-oauth/index.mjs +82 -21
- package/dist/plugins/haveibeenpwned/index.cjs +98 -0
- package/dist/plugins/haveibeenpwned/index.d.cts +36 -0
- package/dist/plugins/haveibeenpwned/index.d.mts +36 -0
- package/dist/plugins/haveibeenpwned/index.d.ts +36 -0
- package/dist/plugins/haveibeenpwned/index.mjs +96 -0
- package/dist/plugins/index.cjs +583 -19
- package/dist/plugins/index.d.cts +7 -5
- package/dist/plugins/index.d.mts +7 -5
- package/dist/plugins/index.d.ts +7 -5
- package/dist/plugins/index.mjs +583 -21
- package/dist/plugins/jwt/index.cjs +45 -21
- package/dist/plugins/jwt/index.d.cts +52 -6
- package/dist/plugins/jwt/index.d.mts +52 -6
- package/dist/plugins/jwt/index.d.ts +52 -6
- package/dist/plugins/jwt/index.mjs +46 -22
- package/dist/plugins/magic-link/index.cjs +3 -3
- package/dist/plugins/magic-link/index.mjs +4 -4
- package/dist/plugins/multi-session/index.cjs +3 -3
- package/dist/plugins/multi-session/index.d.cts +3 -3
- package/dist/plugins/multi-session/index.d.mts +3 -3
- package/dist/plugins/multi-session/index.d.ts +3 -3
- package/dist/plugins/multi-session/index.mjs +4 -4
- package/dist/plugins/oauth-proxy/index.cjs +4 -4
- package/dist/plugins/oauth-proxy/index.d.cts +3 -3
- package/dist/plugins/oauth-proxy/index.d.mts +3 -3
- package/dist/plugins/oauth-proxy/index.d.ts +3 -3
- package/dist/plugins/oauth-proxy/index.mjs +5 -5
- package/dist/plugins/oidc-provider/index.cjs +227 -8
- package/dist/plugins/oidc-provider/index.d.cts +215 -3
- package/dist/plugins/oidc-provider/index.d.mts +215 -3
- package/dist/plugins/oidc-provider/index.d.ts +215 -3
- package/dist/plugins/oidc-provider/index.mjs +228 -9
- package/dist/plugins/one-tap/index.cjs +5 -5
- package/dist/plugins/one-tap/index.mjs +6 -6
- package/dist/plugins/one-time-token/index.cjs +119 -0
- package/dist/plugins/one-time-token/index.d.cts +134 -0
- package/dist/plugins/one-time-token/index.d.mts +134 -0
- package/dist/plugins/one-time-token/index.d.ts +134 -0
- package/dist/plugins/one-time-token/index.mjs +117 -0
- package/dist/plugins/open-api/index.cjs +3 -3
- package/dist/plugins/open-api/index.d.cts +3 -3
- package/dist/plugins/open-api/index.d.mts +3 -3
- package/dist/plugins/open-api/index.d.ts +3 -3
- package/dist/plugins/open-api/index.mjs +4 -4
- package/dist/plugins/organization/access/index.d.cts +1 -1
- package/dist/plugins/organization/access/index.d.mts +1 -1
- package/dist/plugins/organization/access/index.d.ts +1 -1
- package/dist/plugins/organization/index.cjs +4 -4
- package/dist/plugins/organization/index.d.cts +708 -55
- package/dist/plugins/organization/index.d.mts +708 -55
- package/dist/plugins/organization/index.d.ts +708 -55
- package/dist/plugins/organization/index.mjs +5 -5
- package/dist/plugins/passkey/index.cjs +82 -8
- package/dist/plugins/passkey/index.d.cts +72 -3
- package/dist/plugins/passkey/index.d.mts +72 -3
- package/dist/plugins/passkey/index.d.ts +72 -3
- package/dist/plugins/passkey/index.mjs +83 -9
- package/dist/plugins/phone-number/index.cjs +194 -26
- package/dist/plugins/phone-number/index.d.cts +132 -8
- package/dist/plugins/phone-number/index.d.mts +132 -8
- package/dist/plugins/phone-number/index.d.ts +132 -8
- package/dist/plugins/phone-number/index.mjs +195 -27
- package/dist/plugins/sso/index.cjs +190 -7
- package/dist/plugins/sso/index.d.cts +181 -15
- package/dist/plugins/sso/index.d.mts +181 -15
- package/dist/plugins/sso/index.d.ts +181 -15
- package/dist/plugins/sso/index.mjs +191 -8
- package/dist/plugins/two-factor/index.cjs +443 -92
- package/dist/plugins/two-factor/index.d.cts +230 -396
- package/dist/plugins/two-factor/index.d.mts +230 -396
- package/dist/plugins/two-factor/index.d.ts +230 -396
- package/dist/plugins/two-factor/index.mjs +431 -80
- package/dist/plugins/username/index.cjs +34 -31
- package/dist/plugins/username/index.d.cts +15 -12
- package/dist/plugins/username/index.d.mts +15 -12
- package/dist/plugins/username/index.d.ts +15 -12
- package/dist/plugins/username/index.mjs +35 -32
- package/dist/shared/better-auth.1DR6suCQ.mjs +307 -0
- package/dist/shared/{better-auth.BSsp73pg.cjs → better-auth.B7cZ2juS.cjs} +15 -14
- package/dist/shared/{better-auth.bKwabe3I.d.mts → better-auth.B88xucNq.d.mts} +529 -39
- package/dist/shared/{better-auth.CApEjVDP.cjs → better-auth.BW8BpneG.cjs} +4 -1
- package/dist/shared/{better-auth.BiQsvaIP.d.cts → better-auth.BcU1Kjyq.d.cts} +2051 -518
- package/dist/shared/better-auth.BfG24BjZ.cjs +118 -0
- package/dist/shared/{better-auth.A3TjrU8G.mjs → better-auth.Bk5IMdhM.mjs} +32 -12
- package/dist/shared/{better-auth.D9VnBkRI.mjs → better-auth.Bm9HxIzE.mjs} +47 -24
- package/dist/shared/{better-auth.BRf6Iynu.d.ts → better-auth.Bwc-6kOr.d.ts} +1 -1
- package/dist/shared/{better-auth.D-oLmHIj.d.mts → better-auth.CA2hFK4N.d.ts} +2051 -518
- package/dist/shared/{better-auth.Dmhe30iW.d.mts → better-auth.CGukGrxT.d.cts} +1 -1
- package/dist/shared/{better-auth.CsSpq0zL.cjs → better-auth.CHUzBidy.cjs} +46 -23
- package/dist/shared/{better-auth.DWRligF8.d.cts → better-auth.CT9J6rD-.d.cts} +539 -7
- package/dist/shared/better-auth.CVCo5Z2T.cjs +310 -0
- package/dist/shared/{better-auth.D4jH-sJA.mjs → better-auth.CWwVo_61.mjs} +458 -118
- package/dist/shared/{better-auth.Bi8FQwDD.d.cts → better-auth.CYegVoq1.d.cts} +1 -1
- package/dist/shared/{better-auth.Bi8FQwDD.d.mts → better-auth.CYegVoq1.d.mts} +1 -1
- package/dist/shared/{better-auth.Bi8FQwDD.d.ts → better-auth.CYegVoq1.d.ts} +1 -1
- package/dist/shared/{better-auth.CepcSj5H.mjs → better-auth.Cc72UxUH.mjs} +1 -2
- package/dist/shared/{better-auth.BWp5dztg.d.ts → better-auth.CmN4mlPh.d.ts} +539 -7
- package/dist/shared/{better-auth.DH3YjMQH.mjs → better-auth.Cqykj82J.mjs} +1 -1
- package/dist/shared/{better-auth.wcdMj2cT.d.mts → better-auth.DIt2e3lu.d.mts} +539 -7
- package/dist/shared/{better-auth.BANAxdkL.d.ts → better-auth.DNTAFSt1.d.ts} +529 -39
- package/dist/shared/{better-auth.DU2QNVc_.d.ts → better-auth.DQ7OSJbI.d.mts} +2051 -518
- package/dist/shared/{better-auth.DLTzKoOS.cjs → better-auth.DSVbLSt7.cjs} +4 -1
- package/dist/shared/{better-auth.B2Fw1vhH.d.cts → better-auth.DTiSPWEk.d.cts} +529 -39
- package/dist/shared/better-auth.DURsStt9.mjs +116 -0
- package/dist/shared/{better-auth.BIjcZ_vt.cjs → better-auth.DYoLD99C.cjs} +31 -11
- package/dist/shared/{better-auth.CV1L7TPV.cjs → better-auth.D_ZIX1O8.cjs} +317 -47
- package/dist/shared/{better-auth.C5H9XEzZ.cjs → better-auth.DcWKCjjf.cjs} +1 -2
- package/dist/shared/{better-auth.BDYXUcLv.cjs → better-auth.Dg0siV5C.cjs} +457 -117
- package/dist/shared/better-auth.DjryM8pE.cjs +760 -0
- package/dist/shared/{better-auth.DPBQN9Fs.mjs → better-auth.Dn_Ms1Uf.mjs} +318 -48
- package/dist/shared/{better-auth.DiG4KL2x.mjs → better-auth.OuYYTHC7.mjs} +4 -1
- package/dist/shared/{better-auth.DtC8i3pf.d.cts → better-auth.S1jimRbX.d.mts} +1 -1
- package/dist/shared/better-auth.SPmq4a4z.d.mts +344 -0
- package/dist/shared/{better-auth.cOCrlspr.mjs → better-auth.bkwPl2G4.mjs} +4 -1
- package/dist/shared/better-auth.cp2rC2iM.d.ts +344 -0
- package/dist/shared/better-auth.eVy4DZvP.d.cts +344 -0
- package/dist/shared/{better-auth.BrOpzmqo.mjs → better-auth.iKoUsdFE.mjs} +15 -14
- package/dist/shared/better-auth.rSYJCd3o.mjs +758 -0
- package/dist/social-providers/index.cjs +75 -3
- package/dist/social-providers/index.d.cts +2 -2
- package/dist/social-providers/index.d.mts +2 -2
- package/dist/social-providers/index.d.ts +2 -2
- package/dist/social-providers/index.mjs +77 -6
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.d.ts +4 -4
- package/package.json +42 -5
- package/dist/chunks/server.cjs +0 -905
- package/dist/chunks/server.mjs +0 -895
- package/dist/shared/better-auth.BcoSd9tC.mjs +0 -10
- package/dist/shared/better-auth.BnRFp-t0.mjs +0 -405
- package/dist/shared/better-auth.C1-vpKly.cjs +0 -12
- package/dist/shared/better-auth.ClTSOgiD.mjs +0 -140
- package/dist/shared/better-auth.DC8JQbiE.mjs +0 -173
- package/dist/shared/better-auth.DWHWPllD.cjs +0 -175
- package/dist/shared/better-auth.DqLjzBlO.cjs +0 -408
- package/dist/shared/better-auth.m575EIBC.cjs +0 -144
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as better_call from 'better-call';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { U as User } from '../../shared/better-auth.
|
|
4
|
-
import '../../shared/better-auth.
|
|
5
|
-
import '../../shared/better-auth.
|
|
3
|
+
import { U as User } from '../../shared/better-auth.CA2hFK4N.js';
|
|
4
|
+
import '../../shared/better-auth.CYegVoq1.js';
|
|
5
|
+
import '../../shared/better-auth.DNTAFSt1.js';
|
|
6
6
|
import 'jose';
|
|
7
7
|
import 'kysely';
|
|
8
8
|
import 'better-sqlite3';
|
|
@@ -593,6 +593,25 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
593
593
|
options: {
|
|
594
594
|
method: "GET";
|
|
595
595
|
query: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
596
|
+
metadata: {
|
|
597
|
+
openapi: {
|
|
598
|
+
description: string;
|
|
599
|
+
responses: {
|
|
600
|
+
"200": {
|
|
601
|
+
description: string;
|
|
602
|
+
content: {
|
|
603
|
+
"application/json": {
|
|
604
|
+
schema: {
|
|
605
|
+
type: "object";
|
|
606
|
+
additionalProperties: boolean;
|
|
607
|
+
description: string;
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
};
|
|
612
|
+
};
|
|
613
|
+
};
|
|
614
|
+
};
|
|
596
615
|
} & {
|
|
597
616
|
use: any[];
|
|
598
617
|
};
|
|
@@ -661,6 +680,31 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
661
680
|
};
|
|
662
681
|
};
|
|
663
682
|
}>)[];
|
|
683
|
+
metadata: {
|
|
684
|
+
openapi: {
|
|
685
|
+
description: string;
|
|
686
|
+
responses: {
|
|
687
|
+
"200": {
|
|
688
|
+
description: string;
|
|
689
|
+
content: {
|
|
690
|
+
"application/json": {
|
|
691
|
+
schema: {
|
|
692
|
+
type: "object";
|
|
693
|
+
properties: {
|
|
694
|
+
redirectURI: {
|
|
695
|
+
type: string;
|
|
696
|
+
format: string;
|
|
697
|
+
description: string;
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
required: string[];
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
};
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
};
|
|
664
708
|
} & {
|
|
665
709
|
use: any[];
|
|
666
710
|
};
|
|
@@ -789,6 +833,60 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
789
833
|
method: "GET";
|
|
790
834
|
metadata: {
|
|
791
835
|
isAction: boolean;
|
|
836
|
+
openapi: {
|
|
837
|
+
description: string;
|
|
838
|
+
responses: {
|
|
839
|
+
"200": {
|
|
840
|
+
description: string;
|
|
841
|
+
content: {
|
|
842
|
+
"application/json": {
|
|
843
|
+
schema: {
|
|
844
|
+
type: "object";
|
|
845
|
+
properties: {
|
|
846
|
+
sub: {
|
|
847
|
+
type: string;
|
|
848
|
+
description: string;
|
|
849
|
+
};
|
|
850
|
+
email: {
|
|
851
|
+
type: string;
|
|
852
|
+
format: string;
|
|
853
|
+
nullable: boolean;
|
|
854
|
+
description: string;
|
|
855
|
+
};
|
|
856
|
+
name: {
|
|
857
|
+
type: string;
|
|
858
|
+
nullable: boolean;
|
|
859
|
+
description: string;
|
|
860
|
+
};
|
|
861
|
+
picture: {
|
|
862
|
+
type: string;
|
|
863
|
+
format: string;
|
|
864
|
+
nullable: boolean;
|
|
865
|
+
description: string;
|
|
866
|
+
};
|
|
867
|
+
given_name: {
|
|
868
|
+
type: string;
|
|
869
|
+
nullable: boolean;
|
|
870
|
+
description: string;
|
|
871
|
+
};
|
|
872
|
+
family_name: {
|
|
873
|
+
type: string;
|
|
874
|
+
nullable: boolean;
|
|
875
|
+
description: string;
|
|
876
|
+
};
|
|
877
|
+
email_verified: {
|
|
878
|
+
type: string;
|
|
879
|
+
nullable: boolean;
|
|
880
|
+
description: string;
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
required: string[];
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
};
|
|
792
890
|
};
|
|
793
891
|
} & {
|
|
794
892
|
use: any[];
|
|
@@ -939,6 +1037,87 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
939
1037
|
software_version?: string | undefined;
|
|
940
1038
|
software_statement?: string | undefined;
|
|
941
1039
|
}>;
|
|
1040
|
+
metadata: {
|
|
1041
|
+
openapi: {
|
|
1042
|
+
description: string;
|
|
1043
|
+
responses: {
|
|
1044
|
+
"200": {
|
|
1045
|
+
description: string;
|
|
1046
|
+
content: {
|
|
1047
|
+
"application/json": {
|
|
1048
|
+
schema: {
|
|
1049
|
+
type: "object";
|
|
1050
|
+
properties: {
|
|
1051
|
+
name: {
|
|
1052
|
+
type: string;
|
|
1053
|
+
description: string;
|
|
1054
|
+
};
|
|
1055
|
+
icon: {
|
|
1056
|
+
type: string;
|
|
1057
|
+
nullable: boolean;
|
|
1058
|
+
description: string;
|
|
1059
|
+
};
|
|
1060
|
+
metadata: {
|
|
1061
|
+
type: string;
|
|
1062
|
+
additionalProperties: boolean;
|
|
1063
|
+
nullable: boolean;
|
|
1064
|
+
description: string;
|
|
1065
|
+
};
|
|
1066
|
+
clientId: {
|
|
1067
|
+
type: string;
|
|
1068
|
+
description: string;
|
|
1069
|
+
};
|
|
1070
|
+
clientSecret: {
|
|
1071
|
+
type: string;
|
|
1072
|
+
description: string;
|
|
1073
|
+
};
|
|
1074
|
+
redirectURLs: {
|
|
1075
|
+
type: string;
|
|
1076
|
+
items: {
|
|
1077
|
+
type: string;
|
|
1078
|
+
format: string;
|
|
1079
|
+
};
|
|
1080
|
+
description: string;
|
|
1081
|
+
};
|
|
1082
|
+
type: {
|
|
1083
|
+
type: string;
|
|
1084
|
+
description: string;
|
|
1085
|
+
enum: string[];
|
|
1086
|
+
};
|
|
1087
|
+
authenticationScheme: {
|
|
1088
|
+
type: string;
|
|
1089
|
+
description: string;
|
|
1090
|
+
enum: string[];
|
|
1091
|
+
};
|
|
1092
|
+
disabled: {
|
|
1093
|
+
type: string;
|
|
1094
|
+
description: string;
|
|
1095
|
+
enum: boolean[];
|
|
1096
|
+
};
|
|
1097
|
+
userId: {
|
|
1098
|
+
type: string;
|
|
1099
|
+
nullable: boolean;
|
|
1100
|
+
description: string;
|
|
1101
|
+
};
|
|
1102
|
+
createdAt: {
|
|
1103
|
+
type: string;
|
|
1104
|
+
format: string;
|
|
1105
|
+
description: string;
|
|
1106
|
+
};
|
|
1107
|
+
updatedAt: {
|
|
1108
|
+
type: string;
|
|
1109
|
+
format: string;
|
|
1110
|
+
description: string;
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
required: string[];
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
1118
|
+
};
|
|
1119
|
+
};
|
|
1120
|
+
};
|
|
942
1121
|
} & {
|
|
943
1122
|
use: any[];
|
|
944
1123
|
};
|
|
@@ -1004,6 +1183,39 @@ declare const oidcProvider: (options: OIDCOptions) => {
|
|
|
1004
1183
|
};
|
|
1005
1184
|
};
|
|
1006
1185
|
}>)[];
|
|
1186
|
+
metadata: {
|
|
1187
|
+
openapi: {
|
|
1188
|
+
description: string;
|
|
1189
|
+
responses: {
|
|
1190
|
+
"200": {
|
|
1191
|
+
description: string;
|
|
1192
|
+
content: {
|
|
1193
|
+
"application/json": {
|
|
1194
|
+
schema: {
|
|
1195
|
+
type: "object";
|
|
1196
|
+
properties: {
|
|
1197
|
+
clientId: {
|
|
1198
|
+
type: string;
|
|
1199
|
+
description: string;
|
|
1200
|
+
};
|
|
1201
|
+
name: {
|
|
1202
|
+
type: string;
|
|
1203
|
+
description: string;
|
|
1204
|
+
};
|
|
1205
|
+
icon: {
|
|
1206
|
+
type: string;
|
|
1207
|
+
nullable: boolean;
|
|
1208
|
+
description: string;
|
|
1209
|
+
};
|
|
1210
|
+
};
|
|
1211
|
+
required: string[];
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
};
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1007
1219
|
} & {
|
|
1008
1220
|
use: any[];
|
|
1009
1221
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { SignJWT } from 'jose';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { APIError } from 'better-call';
|
|
4
|
-
import { g as getSessionFromCtx, a as createAuthEndpoint, c as createAuthMiddleware, s as sessionMiddleware } from '../../shared/better-auth.
|
|
4
|
+
import { g as getSessionFromCtx, a as createAuthEndpoint, c as createAuthMiddleware, s as sessionMiddleware } from '../../shared/better-auth.CWwVo_61.mjs';
|
|
5
5
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
6
6
|
import { base64 } from '@better-auth/utils/base64';
|
|
7
7
|
import '@better-auth/utils/hmac';
|
|
8
8
|
import { parseSetCookieHeader } from '../../cookies/index.mjs';
|
|
9
|
-
import '../../shared/better-auth.
|
|
10
|
-
import '../../shared/better-auth.
|
|
9
|
+
import '../../shared/better-auth.Cc72UxUH.mjs';
|
|
10
|
+
import '../../shared/better-auth.Cqykj82J.mjs';
|
|
11
11
|
import 'defu';
|
|
12
12
|
import { createHash } from '@better-auth/utils/hash';
|
|
13
13
|
import '@noble/ciphers/chacha';
|
|
@@ -25,11 +25,11 @@ import '../../shared/better-auth.CW6D9eSx.mjs';
|
|
|
25
25
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
26
26
|
import '@better-auth/utils/random';
|
|
27
27
|
import '../../shared/better-auth.BdyOG_p4.mjs';
|
|
28
|
+
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
28
29
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
29
30
|
import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
30
31
|
import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
31
32
|
import 'jose/errors';
|
|
32
|
-
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
33
33
|
import '@better-auth/utils/binary';
|
|
34
34
|
|
|
35
35
|
const schema = {
|
|
@@ -477,7 +477,26 @@ const oidcProvider = (options) => {
|
|
|
477
477
|
"/oauth2/authorize",
|
|
478
478
|
{
|
|
479
479
|
method: "GET",
|
|
480
|
-
query: z.record(z.string(), z.any())
|
|
480
|
+
query: z.record(z.string(), z.any()),
|
|
481
|
+
metadata: {
|
|
482
|
+
openapi: {
|
|
483
|
+
description: "Authorize an OAuth2 request",
|
|
484
|
+
responses: {
|
|
485
|
+
"200": {
|
|
486
|
+
description: "Authorization response generated successfully",
|
|
487
|
+
content: {
|
|
488
|
+
"application/json": {
|
|
489
|
+
schema: {
|
|
490
|
+
type: "object",
|
|
491
|
+
additionalProperties: true,
|
|
492
|
+
description: "Authorization response, contents depend on the authorize function implementation"
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
481
500
|
},
|
|
482
501
|
async (ctx) => {
|
|
483
502
|
return authorize(ctx, opts);
|
|
@@ -490,7 +509,32 @@ const oidcProvider = (options) => {
|
|
|
490
509
|
body: z.object({
|
|
491
510
|
accept: z.boolean()
|
|
492
511
|
}),
|
|
493
|
-
use: [sessionMiddleware]
|
|
512
|
+
use: [sessionMiddleware],
|
|
513
|
+
metadata: {
|
|
514
|
+
openapi: {
|
|
515
|
+
description: "Handle OAuth2 consent",
|
|
516
|
+
responses: {
|
|
517
|
+
"200": {
|
|
518
|
+
description: "Consent processed successfully",
|
|
519
|
+
content: {
|
|
520
|
+
"application/json": {
|
|
521
|
+
schema: {
|
|
522
|
+
type: "object",
|
|
523
|
+
properties: {
|
|
524
|
+
redirectURI: {
|
|
525
|
+
type: "string",
|
|
526
|
+
format: "uri",
|
|
527
|
+
description: "The URI to redirect to, either with an authorization code or an error"
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
required: ["redirectURI"]
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
494
538
|
},
|
|
495
539
|
async (ctx) => {
|
|
496
540
|
const storedCode = await ctx.getSignedCookie(
|
|
@@ -903,7 +947,61 @@ const oidcProvider = (options) => {
|
|
|
903
947
|
{
|
|
904
948
|
method: "GET",
|
|
905
949
|
metadata: {
|
|
906
|
-
isAction: false
|
|
950
|
+
isAction: false,
|
|
951
|
+
openapi: {
|
|
952
|
+
description: "Get OAuth2 user information",
|
|
953
|
+
responses: {
|
|
954
|
+
"200": {
|
|
955
|
+
description: "User information retrieved successfully",
|
|
956
|
+
content: {
|
|
957
|
+
"application/json": {
|
|
958
|
+
schema: {
|
|
959
|
+
type: "object",
|
|
960
|
+
properties: {
|
|
961
|
+
sub: {
|
|
962
|
+
type: "string",
|
|
963
|
+
description: "Subject identifier (user ID)"
|
|
964
|
+
},
|
|
965
|
+
email: {
|
|
966
|
+
type: "string",
|
|
967
|
+
format: "email",
|
|
968
|
+
nullable: true,
|
|
969
|
+
description: "User's email address, included if 'email' scope is granted"
|
|
970
|
+
},
|
|
971
|
+
name: {
|
|
972
|
+
type: "string",
|
|
973
|
+
nullable: true,
|
|
974
|
+
description: "User's full name, included if 'profile' scope is granted"
|
|
975
|
+
},
|
|
976
|
+
picture: {
|
|
977
|
+
type: "string",
|
|
978
|
+
format: "uri",
|
|
979
|
+
nullable: true,
|
|
980
|
+
description: "User's profile picture URL, included if 'profile' scope is granted"
|
|
981
|
+
},
|
|
982
|
+
given_name: {
|
|
983
|
+
type: "string",
|
|
984
|
+
nullable: true,
|
|
985
|
+
description: "User's given name, included if 'profile' scope is granted"
|
|
986
|
+
},
|
|
987
|
+
family_name: {
|
|
988
|
+
type: "string",
|
|
989
|
+
nullable: true,
|
|
990
|
+
description: "User's family name, included if 'profile' scope is granted"
|
|
991
|
+
},
|
|
992
|
+
email_verified: {
|
|
993
|
+
type: "boolean",
|
|
994
|
+
nullable: true,
|
|
995
|
+
description: "Whether the email is verified, included if 'email' scope is granted"
|
|
996
|
+
}
|
|
997
|
+
},
|
|
998
|
+
required: ["sub"]
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
907
1005
|
}
|
|
908
1006
|
},
|
|
909
1007
|
async (ctx) => {
|
|
@@ -1000,7 +1098,95 @@ const oidcProvider = (options) => {
|
|
|
1000
1098
|
software_id: z.string().optional(),
|
|
1001
1099
|
software_version: z.string().optional(),
|
|
1002
1100
|
software_statement: z.string().optional()
|
|
1003
|
-
})
|
|
1101
|
+
}),
|
|
1102
|
+
metadata: {
|
|
1103
|
+
openapi: {
|
|
1104
|
+
description: "Register an OAuth2 application",
|
|
1105
|
+
responses: {
|
|
1106
|
+
"200": {
|
|
1107
|
+
description: "OAuth2 application registered successfully",
|
|
1108
|
+
content: {
|
|
1109
|
+
"application/json": {
|
|
1110
|
+
schema: {
|
|
1111
|
+
type: "object",
|
|
1112
|
+
properties: {
|
|
1113
|
+
name: {
|
|
1114
|
+
type: "string",
|
|
1115
|
+
description: "Name of the OAuth2 application"
|
|
1116
|
+
},
|
|
1117
|
+
icon: {
|
|
1118
|
+
type: "string",
|
|
1119
|
+
nullable: true,
|
|
1120
|
+
description: "Icon URL for the application"
|
|
1121
|
+
},
|
|
1122
|
+
metadata: {
|
|
1123
|
+
type: "object",
|
|
1124
|
+
additionalProperties: true,
|
|
1125
|
+
nullable: true,
|
|
1126
|
+
description: "Additional metadata for the application"
|
|
1127
|
+
},
|
|
1128
|
+
clientId: {
|
|
1129
|
+
type: "string",
|
|
1130
|
+
description: "Unique identifier for the client"
|
|
1131
|
+
},
|
|
1132
|
+
clientSecret: {
|
|
1133
|
+
type: "string",
|
|
1134
|
+
description: "Secret key for the client"
|
|
1135
|
+
},
|
|
1136
|
+
redirectURLs: {
|
|
1137
|
+
type: "array",
|
|
1138
|
+
items: { type: "string", format: "uri" },
|
|
1139
|
+
description: "List of allowed redirect URLs"
|
|
1140
|
+
},
|
|
1141
|
+
type: {
|
|
1142
|
+
type: "string",
|
|
1143
|
+
description: "Type of the client",
|
|
1144
|
+
enum: ["web"]
|
|
1145
|
+
},
|
|
1146
|
+
authenticationScheme: {
|
|
1147
|
+
type: "string",
|
|
1148
|
+
description: "Authentication scheme used by the client",
|
|
1149
|
+
enum: ["client_secret"]
|
|
1150
|
+
},
|
|
1151
|
+
disabled: {
|
|
1152
|
+
type: "boolean",
|
|
1153
|
+
description: "Whether the client is disabled",
|
|
1154
|
+
enum: [false]
|
|
1155
|
+
},
|
|
1156
|
+
userId: {
|
|
1157
|
+
type: "string",
|
|
1158
|
+
nullable: true,
|
|
1159
|
+
description: "ID of the user who registered the client, null if registered anonymously"
|
|
1160
|
+
},
|
|
1161
|
+
createdAt: {
|
|
1162
|
+
type: "string",
|
|
1163
|
+
format: "date-time",
|
|
1164
|
+
description: "Creation timestamp"
|
|
1165
|
+
},
|
|
1166
|
+
updatedAt: {
|
|
1167
|
+
type: "string",
|
|
1168
|
+
format: "date-time",
|
|
1169
|
+
description: "Last update timestamp"
|
|
1170
|
+
}
|
|
1171
|
+
},
|
|
1172
|
+
required: [
|
|
1173
|
+
"name",
|
|
1174
|
+
"clientId",
|
|
1175
|
+
"clientSecret",
|
|
1176
|
+
"redirectURLs",
|
|
1177
|
+
"type",
|
|
1178
|
+
"authenticationScheme",
|
|
1179
|
+
"disabled",
|
|
1180
|
+
"createdAt",
|
|
1181
|
+
"updatedAt"
|
|
1182
|
+
]
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1004
1190
|
},
|
|
1005
1191
|
async (ctx) => {
|
|
1006
1192
|
const body = ctx.body;
|
|
@@ -1089,7 +1275,40 @@ const oidcProvider = (options) => {
|
|
|
1089
1275
|
"/oauth2/client/:id",
|
|
1090
1276
|
{
|
|
1091
1277
|
method: "GET",
|
|
1092
|
-
use: [sessionMiddleware]
|
|
1278
|
+
use: [sessionMiddleware],
|
|
1279
|
+
metadata: {
|
|
1280
|
+
openapi: {
|
|
1281
|
+
description: "Get OAuth2 client details",
|
|
1282
|
+
responses: {
|
|
1283
|
+
"200": {
|
|
1284
|
+
description: "OAuth2 client retrieved successfully",
|
|
1285
|
+
content: {
|
|
1286
|
+
"application/json": {
|
|
1287
|
+
schema: {
|
|
1288
|
+
type: "object",
|
|
1289
|
+
properties: {
|
|
1290
|
+
clientId: {
|
|
1291
|
+
type: "string",
|
|
1292
|
+
description: "Unique identifier for the client"
|
|
1293
|
+
},
|
|
1294
|
+
name: {
|
|
1295
|
+
type: "string",
|
|
1296
|
+
description: "Name of the OAuth2 application"
|
|
1297
|
+
},
|
|
1298
|
+
icon: {
|
|
1299
|
+
type: "string",
|
|
1300
|
+
nullable: true,
|
|
1301
|
+
description: "Icon URL for the application"
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
required: ["clientId", "name"]
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1093
1312
|
},
|
|
1094
1313
|
async (ctx) => {
|
|
1095
1314
|
const client = await ctx.context.adapter.findOne(
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const zod = require('zod');
|
|
4
4
|
const betterCall = require('better-call');
|
|
5
|
-
const refreshToken = require('../../shared/better-auth.
|
|
5
|
+
const refreshToken = require('../../shared/better-auth.Dg0siV5C.cjs');
|
|
6
6
|
const cookies_index = require('../../cookies/index.cjs');
|
|
7
|
-
require('../../shared/better-auth.
|
|
7
|
+
require('../../shared/better-auth.DcWKCjjf.cjs');
|
|
8
8
|
require('../../shared/better-auth.DiSjtgs9.cjs');
|
|
9
9
|
require('../../shared/better-auth.GpOOav9x.cjs');
|
|
10
10
|
require('defu');
|
|
@@ -26,12 +26,12 @@ require('../../shared/better-auth.CYeOI8C-.cjs');
|
|
|
26
26
|
require('@better-auth/utils/random');
|
|
27
27
|
require('../../shared/better-auth.ANpbi45u.cjs');
|
|
28
28
|
require('../../shared/better-auth.QbbyHMYf.cjs');
|
|
29
|
+
require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
29
30
|
require('../../shared/better-auth.Bg6iw3ig.cjs');
|
|
30
31
|
require('@better-auth/utils/hmac');
|
|
31
32
|
require('../../shared/better-auth.BMYo0QR-.cjs');
|
|
32
33
|
require('../../shared/better-auth.C-R0J0n1.cjs');
|
|
33
34
|
require('jose/errors');
|
|
34
|
-
require('../../shared/better-auth.D3mtHEZg.cjs');
|
|
35
35
|
require('@better-auth/utils/binary');
|
|
36
36
|
|
|
37
37
|
function toBoolean(value) {
|
|
@@ -132,7 +132,7 @@ const oneTap = (options) => ({
|
|
|
132
132
|
}
|
|
133
133
|
const session2 = await ctx.context.internalAdapter.createSession(
|
|
134
134
|
newUser.user.id,
|
|
135
|
-
ctx.
|
|
135
|
+
ctx.headers
|
|
136
136
|
);
|
|
137
137
|
await cookies_index.setSessionCookie(ctx, {
|
|
138
138
|
user: newUser.user,
|
|
@@ -171,7 +171,7 @@ const oneTap = (options) => ({
|
|
|
171
171
|
}
|
|
172
172
|
const session = await ctx.context.internalAdapter.createSession(
|
|
173
173
|
user.user.id,
|
|
174
|
-
ctx.
|
|
174
|
+
ctx.headers
|
|
175
175
|
);
|
|
176
176
|
await cookies_index.setSessionCookie(ctx, {
|
|
177
177
|
user: user.user,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { APIError } from 'better-call';
|
|
3
|
-
import { a as createAuthEndpoint } from '../../shared/better-auth.
|
|
3
|
+
import { a as createAuthEndpoint } from '../../shared/better-auth.CWwVo_61.mjs';
|
|
4
4
|
import { setSessionCookie } from '../../cookies/index.mjs';
|
|
5
|
-
import '../../shared/better-auth.
|
|
5
|
+
import '../../shared/better-auth.Cc72UxUH.mjs';
|
|
6
6
|
import '../../shared/better-auth.8zoxzg-F.mjs';
|
|
7
|
-
import '../../shared/better-auth.
|
|
7
|
+
import '../../shared/better-auth.Cqykj82J.mjs';
|
|
8
8
|
import 'defu';
|
|
9
9
|
import { createRemoteJWKSet, jwtVerify } from 'jose';
|
|
10
10
|
import '../../social-providers/index.mjs';
|
|
@@ -24,12 +24,12 @@ import '../../shared/better-auth.B4Qoxdgc.mjs';
|
|
|
24
24
|
import '@better-auth/utils/random';
|
|
25
25
|
import '../../shared/better-auth.DdzSJf-n.mjs';
|
|
26
26
|
import '../../shared/better-auth.BdyOG_p4.mjs';
|
|
27
|
+
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
27
28
|
import '../../shared/better-auth.BUPPRXfK.mjs';
|
|
28
29
|
import '@better-auth/utils/hmac';
|
|
29
30
|
import '../../shared/better-auth.DDEbWX-S.mjs';
|
|
30
31
|
import '../../shared/better-auth.VTXNLFMT.mjs';
|
|
31
32
|
import 'jose/errors';
|
|
32
|
-
import '../../shared/better-auth.tB5eU6EY.mjs';
|
|
33
33
|
import '@better-auth/utils/binary';
|
|
34
34
|
|
|
35
35
|
function toBoolean(value) {
|
|
@@ -130,7 +130,7 @@ const oneTap = (options) => ({
|
|
|
130
130
|
}
|
|
131
131
|
const session2 = await ctx.context.internalAdapter.createSession(
|
|
132
132
|
newUser.user.id,
|
|
133
|
-
ctx.
|
|
133
|
+
ctx.headers
|
|
134
134
|
);
|
|
135
135
|
await setSessionCookie(ctx, {
|
|
136
136
|
user: newUser.user,
|
|
@@ -169,7 +169,7 @@ const oneTap = (options) => ({
|
|
|
169
169
|
}
|
|
170
170
|
const session = await ctx.context.internalAdapter.createSession(
|
|
171
171
|
user.user.id,
|
|
172
|
-
ctx.
|
|
172
|
+
ctx.headers
|
|
173
173
|
);
|
|
174
174
|
await setSessionCookie(ctx, {
|
|
175
175
|
user: user.user,
|