@lunora/auth 1.0.0-alpha.256 → 1.0.0-alpha.257
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/plugins-enterprise.d.mts +30 -29
- package/dist/plugins-enterprise.d.ts +30 -29
- package/package.json +9 -9
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { DBFieldAttribute, RemoveFieldsWithReturnedFalse, FieldAttributeToObject, InferAdditionalFieldsFromPluginOptions } from 'better-auth/db';
|
|
3
3
|
import { DBTransactionAdapter, Awaitable, User, OAuth2Tokens } from 'better-auth';
|
|
4
|
-
import * as _$better_call0 from 'better-call';
|
|
5
4
|
type DeprecatedAlgorithmBehavior = "reject" | "warn" | "allow";
|
|
6
5
|
interface AlgorithmValidationOptions {
|
|
7
6
|
onDeprecated?: DeprecatedAlgorithmBehavior;
|
|
@@ -117,6 +116,9 @@ interface SAMLConfig {
|
|
|
117
116
|
/**
|
|
118
117
|
* Provider-level post-auth redirect URL for IdP-initiated or fallback SAML
|
|
119
118
|
* flows when no RelayState callback URL is available.
|
|
119
|
+
*
|
|
120
|
+
* Not the Assertion Consumer Service (ACS) URL. To accept responses
|
|
121
|
+
* addressed to another ACS URL, list it in `spMetadata.metadata`.
|
|
120
122
|
*/
|
|
121
123
|
callbackUrl?: string | undefined;
|
|
122
124
|
/**
|
|
@@ -648,7 +650,7 @@ interface SSOOptions {
|
|
|
648
650
|
}
|
|
649
651
|
//#endregion
|
|
650
652
|
//#region src/routes/domain-verification.d.ts
|
|
651
|
-
declare const requestDomainVerification: (options: SSOOptions) =>
|
|
653
|
+
declare const requestDomainVerification: (options: SSOOptions) => import("better-call").StrictEndpoint<"/sso/request-domain-verification", {
|
|
652
654
|
method: "POST";
|
|
653
655
|
body: z.ZodObject<{
|
|
654
656
|
providerId: z.ZodString;
|
|
@@ -670,7 +672,7 @@ declare const requestDomainVerification: (options: SSOOptions) => _$better_call0
|
|
|
670
672
|
};
|
|
671
673
|
};
|
|
672
674
|
};
|
|
673
|
-
use:
|
|
675
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
674
676
|
session: {
|
|
675
677
|
session: Record<string, any> & {
|
|
676
678
|
id: string;
|
|
@@ -696,7 +698,7 @@ declare const requestDomainVerification: (options: SSOOptions) => _$better_call0
|
|
|
696
698
|
}, {
|
|
697
699
|
domainVerificationToken: string;
|
|
698
700
|
}>;
|
|
699
|
-
declare const verifyDomain: (options: SSOOptions) =>
|
|
701
|
+
declare const verifyDomain: (options: SSOOptions) => import("better-call").StrictEndpoint<"/sso/verify-domain", {
|
|
700
702
|
method: "POST";
|
|
701
703
|
body: z.ZodObject<{
|
|
702
704
|
providerId: z.ZodString;
|
|
@@ -721,7 +723,7 @@ declare const verifyDomain: (options: SSOOptions) => _$better_call0.StrictEndpoi
|
|
|
721
723
|
};
|
|
722
724
|
};
|
|
723
725
|
};
|
|
724
|
-
use:
|
|
726
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
725
727
|
session: {
|
|
726
728
|
session: Record<string, any> & {
|
|
727
729
|
id: string;
|
|
@@ -759,9 +761,9 @@ type ParsedCert = ReturnType<typeof parseCertificate>;
|
|
|
759
761
|
type SanitizedCert = ParsedCert | {
|
|
760
762
|
error: string;
|
|
761
763
|
};
|
|
762
|
-
declare const listSSOProviders: (options?: SSOOptions) =>
|
|
764
|
+
declare const listSSOProviders: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/providers", {
|
|
763
765
|
method: "GET";
|
|
764
|
-
use:
|
|
766
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
765
767
|
session: {
|
|
766
768
|
session: Record<string, any> & {
|
|
767
769
|
id: string;
|
|
@@ -830,9 +832,9 @@ declare const listSSOProviders: (options?: SSOOptions) => _$better_call0.StrictE
|
|
|
830
832
|
spMetadataUrl: string;
|
|
831
833
|
}[];
|
|
832
834
|
}>;
|
|
833
|
-
declare const getSSOProvider: (options?: SSOOptions) =>
|
|
835
|
+
declare const getSSOProvider: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/get-provider", {
|
|
834
836
|
method: "GET";
|
|
835
|
-
use:
|
|
837
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
836
838
|
session: {
|
|
837
839
|
session: Record<string, any> & {
|
|
838
840
|
id: string;
|
|
@@ -908,9 +910,9 @@ declare const getSSOProvider: (options?: SSOOptions) => _$better_call0.StrictEnd
|
|
|
908
910
|
} | undefined;
|
|
909
911
|
spMetadataUrl: string;
|
|
910
912
|
}>;
|
|
911
|
-
declare const updateSSOProvider: (options: SSOOptions) =>
|
|
913
|
+
declare const updateSSOProvider: (options: SSOOptions) => import("better-call").StrictEndpoint<"/sso/update-provider", {
|
|
912
914
|
method: "POST";
|
|
913
|
-
use:
|
|
915
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
914
916
|
session: {
|
|
915
917
|
session: Record<string, any> & {
|
|
916
918
|
id: string;
|
|
@@ -956,19 +958,18 @@ declare const updateSSOProvider: (options: SSOOptions) => _$better_call0.StrictE
|
|
|
956
958
|
pkce: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
|
|
957
959
|
overrideUserInfo: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
958
960
|
mapping: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
959
|
-
email: z.ZodString
|
|
961
|
+
email: z.ZodOptional<z.ZodString>;
|
|
960
962
|
emailVerified: z.ZodOptional<z.ZodString>;
|
|
961
|
-
name: z.ZodString
|
|
963
|
+
name: z.ZodOptional<z.ZodString>;
|
|
962
964
|
image: z.ZodOptional<z.ZodString>;
|
|
963
965
|
extraFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
964
966
|
}, z.core.$strict>>>;
|
|
965
967
|
}, z.core.$strip>>;
|
|
966
968
|
samlConfig: z.ZodOptional<z.ZodObject<{
|
|
967
|
-
audience: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
968
969
|
mapping: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
969
|
-
email: z.ZodString
|
|
970
|
+
email: z.ZodOptional<z.ZodString>;
|
|
970
971
|
emailVerified: z.ZodOptional<z.ZodString>;
|
|
971
|
-
name: z.ZodString
|
|
972
|
+
name: z.ZodOptional<z.ZodString>;
|
|
972
973
|
firstName: z.ZodOptional<z.ZodString>;
|
|
973
974
|
lastName: z.ZodOptional<z.ZodString>;
|
|
974
975
|
extraFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -986,6 +987,7 @@ declare const updateSSOProvider: (options: SSOOptions) => _$better_call0.StrictE
|
|
|
986
987
|
}, z.core.$strip>>>;
|
|
987
988
|
cert: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
988
989
|
entryPoint: z.ZodOptional<z.ZodString>;
|
|
990
|
+
audience: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
989
991
|
callbackUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
990
992
|
wantAssertionsSigned: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
991
993
|
authnRequestsSigned: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -1064,9 +1066,9 @@ declare const updateSSOProvider: (options: SSOOptions) => _$better_call0.StrictE
|
|
|
1064
1066
|
} | undefined;
|
|
1065
1067
|
spMetadataUrl: string;
|
|
1066
1068
|
}>;
|
|
1067
|
-
declare const deleteSSOProvider: (options?: SSOOptions) =>
|
|
1069
|
+
declare const deleteSSOProvider: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/delete-provider", {
|
|
1068
1070
|
method: "POST";
|
|
1069
|
-
use:
|
|
1071
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1070
1072
|
session: {
|
|
1071
1073
|
session: Record<string, any> & {
|
|
1072
1074
|
id: string;
|
|
@@ -1115,7 +1117,7 @@ declare const deleteSSOProvider: (options?: SSOOptions) => _$better_call0.Strict
|
|
|
1115
1117
|
}>;
|
|
1116
1118
|
//#endregion
|
|
1117
1119
|
//#region src/routes/sso.d.ts
|
|
1118
|
-
declare const spMetadata: (options?: SSOOptions) =>
|
|
1120
|
+
declare const spMetadata: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/metadata", {
|
|
1119
1121
|
method: "GET";
|
|
1120
1122
|
query: z.ZodObject<{
|
|
1121
1123
|
providerId: z.ZodString;
|
|
@@ -1133,12 +1135,12 @@ declare const spMetadata: (options?: SSOOptions) => _$better_call0.StrictEndpoin
|
|
|
1133
1135
|
};
|
|
1134
1136
|
};
|
|
1135
1137
|
}, Response>;
|
|
1136
|
-
declare const registerSSOProvider: <O extends SSOOptions>(options: O) =>
|
|
1138
|
+
declare const registerSSOProvider: <O extends SSOOptions>(options: O) => import("better-call").StrictEndpoint<"/sso/register", {
|
|
1137
1139
|
method: "POST";
|
|
1138
1140
|
body: z.ZodObject<{
|
|
1139
1141
|
[x: string]: z.ZodOptional<z.ZodAny>;
|
|
1140
1142
|
}, z.core.$strip>;
|
|
1141
|
-
use:
|
|
1143
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1142
1144
|
session: {
|
|
1143
1145
|
session: Record<string, any> & {
|
|
1144
1146
|
id: string;
|
|
@@ -1288,7 +1290,6 @@ declare const registerSSOProvider: <O extends SSOOptions>(options: O) => _$bette
|
|
|
1288
1290
|
description: string;
|
|
1289
1291
|
};
|
|
1290
1292
|
};
|
|
1291
|
-
required: string[];
|
|
1292
1293
|
};
|
|
1293
1294
|
};
|
|
1294
1295
|
required: string[];
|
|
@@ -1335,7 +1336,7 @@ declare const registerSSOProvider: <O extends SSOOptions>(options: O) => _$bette
|
|
|
1335
1336
|
oidcConfig: OIDCConfig | null;
|
|
1336
1337
|
samlConfig: SAMLConfig | null;
|
|
1337
1338
|
} & Omit<InferSSOProvider<O>, "samlConfig" | "oidcConfig">>;
|
|
1338
|
-
declare const signInSSO: (options?: SSOOptions) =>
|
|
1339
|
+
declare const signInSSO: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sign-in/sso", {
|
|
1339
1340
|
method: "POST";
|
|
1340
1341
|
body: z.ZodObject<{
|
|
1341
1342
|
email: z.ZodOptional<z.ZodString>;
|
|
@@ -1457,7 +1458,7 @@ declare const signInSSO: (options?: SSOOptions) => _$better_call0.StrictEndpoint
|
|
|
1457
1458
|
url: string;
|
|
1458
1459
|
redirect: boolean;
|
|
1459
1460
|
}>;
|
|
1460
|
-
declare const callbackSSO: (options?: SSOOptions) =>
|
|
1461
|
+
declare const callbackSSO: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/callback/:providerId", {
|
|
1461
1462
|
method: "GET";
|
|
1462
1463
|
query: z.ZodObject<{
|
|
1463
1464
|
code: z.ZodOptional<z.ZodString>;
|
|
@@ -1485,7 +1486,7 @@ declare const callbackSSO: (options?: SSOOptions) => _$better_call0.StrictEndpoi
|
|
|
1485
1486
|
* Used when `options.redirectURI` is set — the `providerId` is read from
|
|
1486
1487
|
* the OAuth state instead of the URL path.
|
|
1487
1488
|
*/
|
|
1488
|
-
declare const callbackSSOShared: (options?: SSOOptions) =>
|
|
1489
|
+
declare const callbackSSOShared: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/callback", {
|
|
1489
1490
|
metadata: {
|
|
1490
1491
|
openapi: {
|
|
1491
1492
|
operationId: string;
|
|
@@ -1508,7 +1509,7 @@ declare const callbackSSOShared: (options?: SSOOptions) => _$better_call0.Strict
|
|
|
1508
1509
|
}, z.core.$strip>;
|
|
1509
1510
|
allowedMediaTypes: readonly ["application/x-www-form-urlencoded", "application/json"];
|
|
1510
1511
|
}, never>;
|
|
1511
|
-
declare const acsEndpoint: (options?: SSOOptions) =>
|
|
1512
|
+
declare const acsEndpoint: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/acs/:providerId", {
|
|
1512
1513
|
method: ("GET" | "POST")[];
|
|
1513
1514
|
body: z.ZodOptional<z.ZodObject<{
|
|
1514
1515
|
SAMLResponse: z.ZodString;
|
|
@@ -1538,7 +1539,7 @@ declare const acsEndpoint: (options?: SSOOptions) => _$better_call0.StrictEndpoi
|
|
|
1538
1539
|
scope: "server";
|
|
1539
1540
|
};
|
|
1540
1541
|
}, never>;
|
|
1541
|
-
declare const sloEndpoint: (options?: SSOOptions) =>
|
|
1542
|
+
declare const sloEndpoint: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/slo/:providerId", {
|
|
1542
1543
|
method: ("GET" | "POST")[];
|
|
1543
1544
|
body: z.ZodOptional<z.ZodObject<{
|
|
1544
1545
|
SAMLRequest: z.ZodOptional<z.ZodString>;
|
|
@@ -1559,12 +1560,12 @@ declare const sloEndpoint: (options?: SSOOptions) => _$better_call0.StrictEndpoi
|
|
|
1559
1560
|
scope: "server";
|
|
1560
1561
|
};
|
|
1561
1562
|
}, void | Response>;
|
|
1562
|
-
declare const initiateSLO: (options?: SSOOptions) =>
|
|
1563
|
+
declare const initiateSLO: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/logout/:providerId", {
|
|
1563
1564
|
method: "POST";
|
|
1564
1565
|
body: z.ZodObject<{
|
|
1565
1566
|
callbackURL: z.ZodOptional<z.ZodString>;
|
|
1566
1567
|
}, z.core.$strip>;
|
|
1567
|
-
use:
|
|
1568
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1568
1569
|
session: {
|
|
1569
1570
|
session: Record<string, any> & {
|
|
1570
1571
|
id: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
import { DBFieldAttribute, RemoveFieldsWithReturnedFalse, FieldAttributeToObject, InferAdditionalFieldsFromPluginOptions } from 'better-auth/db';
|
|
3
3
|
import { DBTransactionAdapter, Awaitable, User, OAuth2Tokens } from 'better-auth';
|
|
4
|
-
import * as _$better_call0 from 'better-call';
|
|
5
4
|
type DeprecatedAlgorithmBehavior = "reject" | "warn" | "allow";
|
|
6
5
|
interface AlgorithmValidationOptions {
|
|
7
6
|
onDeprecated?: DeprecatedAlgorithmBehavior;
|
|
@@ -117,6 +116,9 @@ interface SAMLConfig {
|
|
|
117
116
|
/**
|
|
118
117
|
* Provider-level post-auth redirect URL for IdP-initiated or fallback SAML
|
|
119
118
|
* flows when no RelayState callback URL is available.
|
|
119
|
+
*
|
|
120
|
+
* Not the Assertion Consumer Service (ACS) URL. To accept responses
|
|
121
|
+
* addressed to another ACS URL, list it in `spMetadata.metadata`.
|
|
120
122
|
*/
|
|
121
123
|
callbackUrl?: string | undefined;
|
|
122
124
|
/**
|
|
@@ -648,7 +650,7 @@ interface SSOOptions {
|
|
|
648
650
|
}
|
|
649
651
|
//#endregion
|
|
650
652
|
//#region src/routes/domain-verification.d.ts
|
|
651
|
-
declare const requestDomainVerification: (options: SSOOptions) =>
|
|
653
|
+
declare const requestDomainVerification: (options: SSOOptions) => import("better-call").StrictEndpoint<"/sso/request-domain-verification", {
|
|
652
654
|
method: "POST";
|
|
653
655
|
body: z.ZodObject<{
|
|
654
656
|
providerId: z.ZodString;
|
|
@@ -670,7 +672,7 @@ declare const requestDomainVerification: (options: SSOOptions) => _$better_call0
|
|
|
670
672
|
};
|
|
671
673
|
};
|
|
672
674
|
};
|
|
673
|
-
use:
|
|
675
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
674
676
|
session: {
|
|
675
677
|
session: Record<string, any> & {
|
|
676
678
|
id: string;
|
|
@@ -696,7 +698,7 @@ declare const requestDomainVerification: (options: SSOOptions) => _$better_call0
|
|
|
696
698
|
}, {
|
|
697
699
|
domainVerificationToken: string;
|
|
698
700
|
}>;
|
|
699
|
-
declare const verifyDomain: (options: SSOOptions) =>
|
|
701
|
+
declare const verifyDomain: (options: SSOOptions) => import("better-call").StrictEndpoint<"/sso/verify-domain", {
|
|
700
702
|
method: "POST";
|
|
701
703
|
body: z.ZodObject<{
|
|
702
704
|
providerId: z.ZodString;
|
|
@@ -721,7 +723,7 @@ declare const verifyDomain: (options: SSOOptions) => _$better_call0.StrictEndpoi
|
|
|
721
723
|
};
|
|
722
724
|
};
|
|
723
725
|
};
|
|
724
|
-
use:
|
|
726
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
725
727
|
session: {
|
|
726
728
|
session: Record<string, any> & {
|
|
727
729
|
id: string;
|
|
@@ -759,9 +761,9 @@ type ParsedCert = ReturnType<typeof parseCertificate>;
|
|
|
759
761
|
type SanitizedCert = ParsedCert | {
|
|
760
762
|
error: string;
|
|
761
763
|
};
|
|
762
|
-
declare const listSSOProviders: (options?: SSOOptions) =>
|
|
764
|
+
declare const listSSOProviders: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/providers", {
|
|
763
765
|
method: "GET";
|
|
764
|
-
use:
|
|
766
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
765
767
|
session: {
|
|
766
768
|
session: Record<string, any> & {
|
|
767
769
|
id: string;
|
|
@@ -830,9 +832,9 @@ declare const listSSOProviders: (options?: SSOOptions) => _$better_call0.StrictE
|
|
|
830
832
|
spMetadataUrl: string;
|
|
831
833
|
}[];
|
|
832
834
|
}>;
|
|
833
|
-
declare const getSSOProvider: (options?: SSOOptions) =>
|
|
835
|
+
declare const getSSOProvider: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/get-provider", {
|
|
834
836
|
method: "GET";
|
|
835
|
-
use:
|
|
837
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
836
838
|
session: {
|
|
837
839
|
session: Record<string, any> & {
|
|
838
840
|
id: string;
|
|
@@ -908,9 +910,9 @@ declare const getSSOProvider: (options?: SSOOptions) => _$better_call0.StrictEnd
|
|
|
908
910
|
} | undefined;
|
|
909
911
|
spMetadataUrl: string;
|
|
910
912
|
}>;
|
|
911
|
-
declare const updateSSOProvider: (options: SSOOptions) =>
|
|
913
|
+
declare const updateSSOProvider: (options: SSOOptions) => import("better-call").StrictEndpoint<"/sso/update-provider", {
|
|
912
914
|
method: "POST";
|
|
913
|
-
use:
|
|
915
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
914
916
|
session: {
|
|
915
917
|
session: Record<string, any> & {
|
|
916
918
|
id: string;
|
|
@@ -956,19 +958,18 @@ declare const updateSSOProvider: (options: SSOOptions) => _$better_call0.StrictE
|
|
|
956
958
|
pkce: z.ZodOptional<z.ZodOptional<z.ZodDefault<z.ZodBoolean>>>;
|
|
957
959
|
overrideUserInfo: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
958
960
|
mapping: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
959
|
-
email: z.ZodString
|
|
961
|
+
email: z.ZodOptional<z.ZodString>;
|
|
960
962
|
emailVerified: z.ZodOptional<z.ZodString>;
|
|
961
|
-
name: z.ZodString
|
|
963
|
+
name: z.ZodOptional<z.ZodString>;
|
|
962
964
|
image: z.ZodOptional<z.ZodString>;
|
|
963
965
|
extraFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
964
966
|
}, z.core.$strict>>>;
|
|
965
967
|
}, z.core.$strip>>;
|
|
966
968
|
samlConfig: z.ZodOptional<z.ZodObject<{
|
|
967
|
-
audience: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
968
969
|
mapping: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
969
|
-
email: z.ZodString
|
|
970
|
+
email: z.ZodOptional<z.ZodString>;
|
|
970
971
|
emailVerified: z.ZodOptional<z.ZodString>;
|
|
971
|
-
name: z.ZodString
|
|
972
|
+
name: z.ZodOptional<z.ZodString>;
|
|
972
973
|
firstName: z.ZodOptional<z.ZodString>;
|
|
973
974
|
lastName: z.ZodOptional<z.ZodString>;
|
|
974
975
|
extraFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
@@ -986,6 +987,7 @@ declare const updateSSOProvider: (options: SSOOptions) => _$better_call0.StrictE
|
|
|
986
987
|
}, z.core.$strip>>>;
|
|
987
988
|
cert: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
988
989
|
entryPoint: z.ZodOptional<z.ZodString>;
|
|
990
|
+
audience: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
989
991
|
callbackUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
990
992
|
wantAssertionsSigned: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
991
993
|
authnRequestsSigned: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -1064,9 +1066,9 @@ declare const updateSSOProvider: (options: SSOOptions) => _$better_call0.StrictE
|
|
|
1064
1066
|
} | undefined;
|
|
1065
1067
|
spMetadataUrl: string;
|
|
1066
1068
|
}>;
|
|
1067
|
-
declare const deleteSSOProvider: (options?: SSOOptions) =>
|
|
1069
|
+
declare const deleteSSOProvider: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/delete-provider", {
|
|
1068
1070
|
method: "POST";
|
|
1069
|
-
use:
|
|
1071
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1070
1072
|
session: {
|
|
1071
1073
|
session: Record<string, any> & {
|
|
1072
1074
|
id: string;
|
|
@@ -1115,7 +1117,7 @@ declare const deleteSSOProvider: (options?: SSOOptions) => _$better_call0.Strict
|
|
|
1115
1117
|
}>;
|
|
1116
1118
|
//#endregion
|
|
1117
1119
|
//#region src/routes/sso.d.ts
|
|
1118
|
-
declare const spMetadata: (options?: SSOOptions) =>
|
|
1120
|
+
declare const spMetadata: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/metadata", {
|
|
1119
1121
|
method: "GET";
|
|
1120
1122
|
query: z.ZodObject<{
|
|
1121
1123
|
providerId: z.ZodString;
|
|
@@ -1133,12 +1135,12 @@ declare const spMetadata: (options?: SSOOptions) => _$better_call0.StrictEndpoin
|
|
|
1133
1135
|
};
|
|
1134
1136
|
};
|
|
1135
1137
|
}, Response>;
|
|
1136
|
-
declare const registerSSOProvider: <O extends SSOOptions>(options: O) =>
|
|
1138
|
+
declare const registerSSOProvider: <O extends SSOOptions>(options: O) => import("better-call").StrictEndpoint<"/sso/register", {
|
|
1137
1139
|
method: "POST";
|
|
1138
1140
|
body: z.ZodObject<{
|
|
1139
1141
|
[x: string]: z.ZodOptional<z.ZodAny>;
|
|
1140
1142
|
}, z.core.$strip>;
|
|
1141
|
-
use:
|
|
1143
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1142
1144
|
session: {
|
|
1143
1145
|
session: Record<string, any> & {
|
|
1144
1146
|
id: string;
|
|
@@ -1288,7 +1290,6 @@ declare const registerSSOProvider: <O extends SSOOptions>(options: O) => _$bette
|
|
|
1288
1290
|
description: string;
|
|
1289
1291
|
};
|
|
1290
1292
|
};
|
|
1291
|
-
required: string[];
|
|
1292
1293
|
};
|
|
1293
1294
|
};
|
|
1294
1295
|
required: string[];
|
|
@@ -1335,7 +1336,7 @@ declare const registerSSOProvider: <O extends SSOOptions>(options: O) => _$bette
|
|
|
1335
1336
|
oidcConfig: OIDCConfig | null;
|
|
1336
1337
|
samlConfig: SAMLConfig | null;
|
|
1337
1338
|
} & Omit<InferSSOProvider<O>, "samlConfig" | "oidcConfig">>;
|
|
1338
|
-
declare const signInSSO: (options?: SSOOptions) =>
|
|
1339
|
+
declare const signInSSO: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sign-in/sso", {
|
|
1339
1340
|
method: "POST";
|
|
1340
1341
|
body: z.ZodObject<{
|
|
1341
1342
|
email: z.ZodOptional<z.ZodString>;
|
|
@@ -1457,7 +1458,7 @@ declare const signInSSO: (options?: SSOOptions) => _$better_call0.StrictEndpoint
|
|
|
1457
1458
|
url: string;
|
|
1458
1459
|
redirect: boolean;
|
|
1459
1460
|
}>;
|
|
1460
|
-
declare const callbackSSO: (options?: SSOOptions) =>
|
|
1461
|
+
declare const callbackSSO: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/callback/:providerId", {
|
|
1461
1462
|
method: "GET";
|
|
1462
1463
|
query: z.ZodObject<{
|
|
1463
1464
|
code: z.ZodOptional<z.ZodString>;
|
|
@@ -1485,7 +1486,7 @@ declare const callbackSSO: (options?: SSOOptions) => _$better_call0.StrictEndpoi
|
|
|
1485
1486
|
* Used when `options.redirectURI` is set — the `providerId` is read from
|
|
1486
1487
|
* the OAuth state instead of the URL path.
|
|
1487
1488
|
*/
|
|
1488
|
-
declare const callbackSSOShared: (options?: SSOOptions) =>
|
|
1489
|
+
declare const callbackSSOShared: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/callback", {
|
|
1489
1490
|
metadata: {
|
|
1490
1491
|
openapi: {
|
|
1491
1492
|
operationId: string;
|
|
@@ -1508,7 +1509,7 @@ declare const callbackSSOShared: (options?: SSOOptions) => _$better_call0.Strict
|
|
|
1508
1509
|
}, z.core.$strip>;
|
|
1509
1510
|
allowedMediaTypes: readonly ["application/x-www-form-urlencoded", "application/json"];
|
|
1510
1511
|
}, never>;
|
|
1511
|
-
declare const acsEndpoint: (options?: SSOOptions) =>
|
|
1512
|
+
declare const acsEndpoint: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/acs/:providerId", {
|
|
1512
1513
|
method: ("GET" | "POST")[];
|
|
1513
1514
|
body: z.ZodOptional<z.ZodObject<{
|
|
1514
1515
|
SAMLResponse: z.ZodString;
|
|
@@ -1538,7 +1539,7 @@ declare const acsEndpoint: (options?: SSOOptions) => _$better_call0.StrictEndpoi
|
|
|
1538
1539
|
scope: "server";
|
|
1539
1540
|
};
|
|
1540
1541
|
}, never>;
|
|
1541
|
-
declare const sloEndpoint: (options?: SSOOptions) =>
|
|
1542
|
+
declare const sloEndpoint: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/sp/slo/:providerId", {
|
|
1542
1543
|
method: ("GET" | "POST")[];
|
|
1543
1544
|
body: z.ZodOptional<z.ZodObject<{
|
|
1544
1545
|
SAMLRequest: z.ZodOptional<z.ZodString>;
|
|
@@ -1559,12 +1560,12 @@ declare const sloEndpoint: (options?: SSOOptions) => _$better_call0.StrictEndpoi
|
|
|
1559
1560
|
scope: "server";
|
|
1560
1561
|
};
|
|
1561
1562
|
}, void | Response>;
|
|
1562
|
-
declare const initiateSLO: (options?: SSOOptions) =>
|
|
1563
|
+
declare const initiateSLO: (options?: SSOOptions) => import("better-call").StrictEndpoint<"/sso/saml2/logout/:providerId", {
|
|
1563
1564
|
method: "POST";
|
|
1564
1565
|
body: z.ZodObject<{
|
|
1565
1566
|
callbackURL: z.ZodOptional<z.ZodString>;
|
|
1566
1567
|
}, z.core.$strip>;
|
|
1567
|
-
use:
|
|
1568
|
+
use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
|
|
1568
1569
|
session: {
|
|
1569
1570
|
session: Record<string, any> & {
|
|
1570
1571
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/auth",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.257",
|
|
4
4
|
"description": "Auth for Lunora — a thin better-auth wrapper: email/password, OAuth, plugins, D1-backed",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"auth",
|
|
@@ -114,14 +114,14 @@
|
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@better-auth/api-key": "1.7.
|
|
118
|
-
"@better-auth/cimd": "1.7.
|
|
119
|
-
"@better-auth/mcp": "1.7.
|
|
120
|
-
"@better-auth/oauth-provider": "1.7.
|
|
121
|
-
"@better-auth/passkey": "1.7.
|
|
122
|
-
"@better-auth/scim": "1.7.
|
|
117
|
+
"@better-auth/api-key": "1.7.16",
|
|
118
|
+
"@better-auth/cimd": "1.7.16",
|
|
119
|
+
"@better-auth/mcp": "1.7.16",
|
|
120
|
+
"@better-auth/oauth-provider": "1.7.16",
|
|
121
|
+
"@better-auth/passkey": "1.7.16",
|
|
122
|
+
"@better-auth/scim": "1.7.16",
|
|
123
123
|
"@lunora/errors": ">=1.0.0-alpha.51 <2.0.0-0",
|
|
124
|
-
"@lunora/values": "1.0.0-alpha.
|
|
124
|
+
"@lunora/values": "^1.0.0-alpha.95",
|
|
125
125
|
"@lunora/wire": "1.0.0-alpha.6",
|
|
126
126
|
"@visulima/disposable-email-domains": "2.0.10",
|
|
127
127
|
"@visulima/email-verifier": "1.0.54",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"@better-auth/core": ">=1.7.3 <2.0.0-0",
|
|
133
133
|
"@better-auth/sso": ">=1.7.3 <2.0.0-0",
|
|
134
134
|
"@lunora/server": ">=1.0.0-alpha.24 <2.0.0-0",
|
|
135
|
-
"better-auth": ">=1.7.
|
|
135
|
+
"better-auth": ">=1.7.16 <2.0.0-0"
|
|
136
136
|
},
|
|
137
137
|
"peerDependenciesMeta": {
|
|
138
138
|
"@better-auth/sso": {
|