@absolutejs/auth 0.65.2 → 0.65.3
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/cli/migrate.js.map +2 -2
- package/dist/index.js +34 -4
- package/dist/index.js.map +7 -6
- package/dist/server.js +32 -4
- package/dist/server.js.map +7 -6
- package/dist/session/neonStore.d.ts +9 -8
- package/dist/types.d.ts +12 -5
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -5683,6 +5683,26 @@ import { Elysia as Elysia9, t as t6 } from "elysia";
|
|
|
5683
5683
|
|
|
5684
5684
|
// src/utils.ts
|
|
5685
5685
|
init_constants();
|
|
5686
|
+
|
|
5687
|
+
// src/types.ts
|
|
5688
|
+
function isJsonValue(value) {
|
|
5689
|
+
if (value === null || typeof value === "boolean" || typeof value === "string")
|
|
5690
|
+
return true;
|
|
5691
|
+
if (typeof value === "number")
|
|
5692
|
+
return Number.isFinite(value);
|
|
5693
|
+
if (Array.isArray(value))
|
|
5694
|
+
return value.every(isJsonValue);
|
|
5695
|
+
if (typeof value !== "object")
|
|
5696
|
+
return false;
|
|
5697
|
+
return Object.values(value).every(isJsonValue);
|
|
5698
|
+
}
|
|
5699
|
+
var parseJsonObject = (value) => {
|
|
5700
|
+
if (!isJsonValue(value) || value === null || Array.isArray(value) || typeof value !== "object")
|
|
5701
|
+
throw new TypeError("Expected a JSON object");
|
|
5702
|
+
return value;
|
|
5703
|
+
};
|
|
5704
|
+
|
|
5705
|
+
// src/utils.ts
|
|
5686
5706
|
var MILLISECONDS_IN_A_SECOND2 = 1000;
|
|
5687
5707
|
var readOptionalString = (value, property) => {
|
|
5688
5708
|
const candidate = Reflect.get(value, property);
|
|
@@ -5842,7 +5862,7 @@ var resolveOAuthAuthorization = async ({
|
|
|
5842
5862
|
oauthSubject,
|
|
5843
5863
|
refreshToken,
|
|
5844
5864
|
tokenType: typeof tokenType === "string" ? tokenType : undefined,
|
|
5845
|
-
userIdentity
|
|
5865
|
+
userIdentity: parseJsonObject(userIdentity)
|
|
5846
5866
|
};
|
|
5847
5867
|
};
|
|
5848
5868
|
var parseExpiresInSeconds = (expiresIn) => {
|
|
@@ -31864,6 +31884,14 @@ __export(exports_value2, {
|
|
|
31864
31884
|
// src/session/redisStore.ts
|
|
31865
31885
|
var SESSION_SEGMENT = "sess:";
|
|
31866
31886
|
var UNREGISTERED_SEGMENT = "unreg:";
|
|
31887
|
+
var jsonValueSchema = Type.Recursive((self2) => Type.Union([
|
|
31888
|
+
Type.String(),
|
|
31889
|
+
Type.Number(),
|
|
31890
|
+
Type.Boolean(),
|
|
31891
|
+
Type.Null(),
|
|
31892
|
+
Type.Array(self2),
|
|
31893
|
+
Type.Record(Type.String(), self2)
|
|
31894
|
+
]));
|
|
31867
31895
|
var impersonatorSchema = Type.Object({
|
|
31868
31896
|
actorEmail: Type.Optional(Type.String()),
|
|
31869
31897
|
actorId: Type.String(),
|
|
@@ -31893,8 +31921,8 @@ var unregisteredSessionSchema = Type.Object({
|
|
|
31893
31921
|
expiresAt: Type.Number(),
|
|
31894
31922
|
oauthSubject: Type.Optional(Type.Union([Type.String(), Type.Number()])),
|
|
31895
31923
|
refreshToken: Type.Optional(Type.String()),
|
|
31896
|
-
sessionInformation: Type.Optional(Type.Record(Type.String(),
|
|
31897
|
-
userIdentity: Type.Optional(Type.Record(Type.String(),
|
|
31924
|
+
sessionInformation: Type.Optional(Type.Record(Type.String(), jsonValueSchema)),
|
|
31925
|
+
userIdentity: Type.Optional(Type.Record(Type.String(), jsonValueSchema))
|
|
31898
31926
|
});
|
|
31899
31927
|
var parseJson = (raw) => {
|
|
31900
31928
|
if (raw === null)
|
|
@@ -38815,5 +38843,5 @@ export {
|
|
|
38815
38843
|
VerificationProviderError
|
|
38816
38844
|
};
|
|
38817
38845
|
|
|
38818
|
-
//# debugId=
|
|
38846
|
+
//# debugId=8EFCB70B3864A79464756E2164756E21
|
|
38819
38847
|
//# sourceMappingURL=server.js.map
|