@cedarjs/auth-dbauth-api 5.0.7-next.338 → 5.0.7
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/DbAuthHandler.d.ts.map +1 -1
- package/dist/DbAuthHandler.js +74 -56
- package/dist/decoder.js +30 -5
- package/dist/errors.js +56 -2
- package/dist/index.js +36 -7
- package/dist/shared.js +67 -21
- package/package.json +10 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DbAuthHandler.d.ts","sourceRoot":"","sources":["../src/DbAuthHandler.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AAIhF,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAuB3E,UAAU,iBAAiB,CAAC,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnE;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;;;OAOG;IACH,OAAO,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,eAAe,CAAC,KAAK,GAAG,CAAA;IAE7E;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAA;IAElD;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,cAAc,CAAC,EAAE,MAAM,CAAA;KACxB,CAAA;IAED;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,UAAU,yBAAyB,CAAC,KAAK,GAAG,QAAQ;IAClD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;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AAO,CAAC,EAC5D,OAAO,UAAgB,EACvB,OAAO;;KAAsB;;;;;IAW/B,SAAS;;;IAMT,WAAW,CAAC,OAAO,EAAE,MAAM;;;;;IAQ3B,4BAA4B,CAC1B,QAAQ,EAAE,MAAM,EAChB,uBAAuB,EAAE,MAAM,GAAG,SAAS;;;;;;;;CAgB9C"}
|
package/dist/DbAuthHandler.js
CHANGED
|
@@ -1,25 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DbAuthHandler_exports = {};
|
|
30
|
+
__export(DbAuthHandler_exports, {
|
|
31
|
+
DbAuthHandler: () => DbAuthHandler
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(DbAuthHandler_exports);
|
|
34
|
+
var import_md5 = __toESM(require("md5"));
|
|
35
|
+
var import_uuid = require("uuid");
|
|
36
|
+
var import_api = require("@cedarjs/api");
|
|
37
|
+
var DbAuthError = __toESM(require("./errors.js"));
|
|
38
|
+
var import_shared = require("./shared.js");
|
|
23
39
|
const DEFAULT_ALLOWED_USER_FIELDS = ["id", "email"];
|
|
24
40
|
class DbAuthHandler {
|
|
25
41
|
event;
|
|
@@ -85,7 +101,7 @@ class DbAuthHandler {
|
|
|
85
101
|
}
|
|
86
102
|
// generate a new token (standard UUID)
|
|
87
103
|
static get CSRF_TOKEN() {
|
|
88
|
-
return
|
|
104
|
+
return (0, import_uuid.v4)();
|
|
89
105
|
}
|
|
90
106
|
static get AVAILABLE_WEBAUTHN_TRANSPORTS() {
|
|
91
107
|
return ["usb", "ble", "nfc", "internal"];
|
|
@@ -104,7 +120,7 @@ class DbAuthHandler {
|
|
|
104
120
|
deleteHeaders.append(
|
|
105
121
|
"set-cookie",
|
|
106
122
|
[
|
|
107
|
-
`${generateCookieName(this.options.cookie?.name)}=`,
|
|
123
|
+
`${(0, import_shared.generateCookieName)(this.options.cookie?.name)}=`,
|
|
108
124
|
...this._cookieAttributes({ expires: "now" })
|
|
109
125
|
].join(";")
|
|
110
126
|
);
|
|
@@ -119,9 +135,9 @@ class DbAuthHandler {
|
|
|
119
135
|
constructor(event, _context, options) {
|
|
120
136
|
this.options = options;
|
|
121
137
|
this.event = event;
|
|
122
|
-
this.httpMethod = isFetchApiRequest(event) ? event.method : event.httpMethod;
|
|
123
|
-
this.cookie = extractCookie(event) || "";
|
|
124
|
-
this.createResponse = getDbAuthResponseBuilder(event);
|
|
138
|
+
this.httpMethod = (0, import_api.isFetchApiRequest)(event) ? event.method : event.httpMethod;
|
|
139
|
+
this.cookie = (0, import_shared.extractCookie)(event) || "";
|
|
140
|
+
this.createResponse = (0, import_shared.getDbAuthResponseBuilder)(event);
|
|
125
141
|
this._validateOptions();
|
|
126
142
|
this.db = this.options.db;
|
|
127
143
|
this.dbAccessor = this.db[this.options.authModelAccessor];
|
|
@@ -139,11 +155,11 @@ class DbAuthHandler {
|
|
|
139
155
|
);
|
|
140
156
|
this.webAuthnExpiresDate = webAuthnExpiresAt.toUTCString();
|
|
141
157
|
if (options.cors) {
|
|
142
|
-
this.corsContext = createCorsContext(options.cors);
|
|
158
|
+
this.corsContext = (0, import_api.createCorsContext)(options.cors);
|
|
143
159
|
}
|
|
144
160
|
try {
|
|
145
|
-
this.encryptedSession = getSession(this.cookie, this.options.cookie?.name);
|
|
146
|
-
const [session, csrfToken] = decryptSession(this.encryptedSession);
|
|
161
|
+
this.encryptedSession = (0, import_shared.getSession)(this.cookie, this.options.cookie?.name);
|
|
162
|
+
const [session, csrfToken] = (0, import_shared.decryptSession)(this.encryptedSession);
|
|
147
163
|
this.session = session;
|
|
148
164
|
this.sessionCsrfToken = csrfToken;
|
|
149
165
|
} catch (e) {
|
|
@@ -158,7 +174,7 @@ class DbAuthHandler {
|
|
|
158
174
|
// is parsed async
|
|
159
175
|
async init() {
|
|
160
176
|
if (!this._normalizedRequest) {
|
|
161
|
-
this._normalizedRequest = await normalizeRequest(
|
|
177
|
+
this._normalizedRequest = await (0, import_api.normalizeRequest)(
|
|
162
178
|
this.event
|
|
163
179
|
);
|
|
164
180
|
}
|
|
@@ -227,10 +243,10 @@ class DbAuthHandler {
|
|
|
227
243
|
tokenExpires.setSeconds(
|
|
228
244
|
tokenExpires.getSeconds() + this.options.forgotPassword.expires
|
|
229
245
|
);
|
|
230
|
-
let token =
|
|
246
|
+
let token = (0, import_md5.default)((0, import_uuid.v4)());
|
|
231
247
|
const buffer = Buffer.from(token);
|
|
232
248
|
token = buffer.toString("base64").replace("=", "").substring(0, 16);
|
|
233
|
-
const tokenHash = hashToken(token);
|
|
249
|
+
const tokenHash = (0, import_shared.hashToken)(token);
|
|
234
250
|
try {
|
|
235
251
|
user = await this.dbAccessor.update({
|
|
236
252
|
where: {
|
|
@@ -259,7 +275,7 @@ class DbAuthHandler {
|
|
|
259
275
|
try {
|
|
260
276
|
const user = await this._getCurrentUser();
|
|
261
277
|
let headers = new Headers();
|
|
262
|
-
if (isLegacySession(this.cookie)) {
|
|
278
|
+
if ((0, import_shared.isLegacySession)(this.cookie)) {
|
|
263
279
|
headers = this._loginResponse(user)[1];
|
|
264
280
|
}
|
|
265
281
|
return [user[this.options.authFields.id], headers];
|
|
@@ -310,10 +326,10 @@ class DbAuthHandler {
|
|
|
310
326
|
;
|
|
311
327
|
this.options.signup.passwordValidation?.(password);
|
|
312
328
|
let user = await this._findUserByToken(resetToken);
|
|
313
|
-
const [hashedPassword] = hashPassword(password, {
|
|
329
|
+
const [hashedPassword] = (0, import_shared.hashPassword)(password, {
|
|
314
330
|
salt: user.salt
|
|
315
331
|
});
|
|
316
|
-
const [legacyHashedPassword] = legacyHashPassword(password, user.salt);
|
|
332
|
+
const [legacyHashedPassword] = (0, import_shared.legacyHashPassword)(password, user.salt);
|
|
317
333
|
if (!this.options.resetPassword.allowReusedPassword && user.hashedPassword === hashedPassword || user.hashedPassword === legacyHashedPassword) {
|
|
318
334
|
throw new DbAuthError.ReusedPasswordError(
|
|
319
335
|
this.options.resetPassword?.errors?.reusedPassword
|
|
@@ -416,16 +432,17 @@ class DbAuthHandler {
|
|
|
416
432
|
await this._saveChallenge(user[this.options.authFields.id], null);
|
|
417
433
|
}
|
|
418
434
|
const { verified, authenticationInfo } = verification;
|
|
419
|
-
if (verified) {
|
|
420
|
-
|
|
421
|
-
where: {
|
|
422
|
-
[webAuthnOptions.credentialFields.id]: credential[webAuthnOptions.credentialFields.id]
|
|
423
|
-
},
|
|
424
|
-
data: {
|
|
425
|
-
[webAuthnOptions.credentialFields.counter]: authenticationInfo.newCounter
|
|
426
|
-
}
|
|
427
|
-
});
|
|
435
|
+
if (!verified) {
|
|
436
|
+
throw new DbAuthError.WebAuthnError("Authentication failed");
|
|
428
437
|
}
|
|
438
|
+
await this.dbCredentialAccessor.update({
|
|
439
|
+
where: {
|
|
440
|
+
[webAuthnOptions.credentialFields.id]: credential[webAuthnOptions.credentialFields.id]
|
|
441
|
+
},
|
|
442
|
+
data: {
|
|
443
|
+
[webAuthnOptions.credentialFields.counter]: authenticationInfo.newCounter
|
|
444
|
+
}
|
|
445
|
+
});
|
|
429
446
|
const [, headers] = this._loginResponse(user);
|
|
430
447
|
headers.append(
|
|
431
448
|
"set-cookie",
|
|
@@ -440,7 +457,7 @@ class DbAuthHandler {
|
|
|
440
457
|
throw new DbAuthError.WebAuthnError("WebAuthn is not enabled");
|
|
441
458
|
}
|
|
442
459
|
const webAuthnOptions = this.options.webAuthn;
|
|
443
|
-
const credentialId = webAuthnSession(this.event);
|
|
460
|
+
const credentialId = (0, import_shared.webAuthnSession)(this.event);
|
|
444
461
|
let user;
|
|
445
462
|
if (credentialId) {
|
|
446
463
|
const credential = await this.dbCredentialAccessor.findUnique({
|
|
@@ -669,9 +686,9 @@ class DbAuthHandler {
|
|
|
669
686
|
// creates the session)
|
|
670
687
|
_createSessionCookieString(data, csrfToken) {
|
|
671
688
|
const session = JSON.stringify(data) + ";" + csrfToken;
|
|
672
|
-
const encrypted = encryptSession(session);
|
|
689
|
+
const encrypted = (0, import_shared.encryptSession)(session);
|
|
673
690
|
const sessionCookieString = [
|
|
674
|
-
`${generateCookieName(this.options.cookie?.name)}=${encrypted}`,
|
|
691
|
+
`${(0, import_shared.generateCookieName)(this.options.cookie?.name)}=${encrypted}`,
|
|
675
692
|
...this._cookieAttributes({ expires: this.sessionExpiresDate })
|
|
676
693
|
].join(";");
|
|
677
694
|
return sessionCookieString;
|
|
@@ -689,7 +706,7 @@ class DbAuthHandler {
|
|
|
689
706
|
tokenExpires.setSeconds(
|
|
690
707
|
tokenExpires.getSeconds() - this.options.forgotPassword.expires
|
|
691
708
|
);
|
|
692
|
-
const tokenHash = hashToken(token);
|
|
709
|
+
const tokenHash = (0, import_shared.hashToken)(token);
|
|
693
710
|
const user = await this.dbAccessor.findFirst({
|
|
694
711
|
where: {
|
|
695
712
|
[this.options.authFields.resetToken]: tokenHash
|
|
@@ -755,11 +772,11 @@ class DbAuthHandler {
|
|
|
755
772
|
// with the one in the database. Falls back to the legacy CryptoJS algorihtm
|
|
756
773
|
// if no options are present.
|
|
757
774
|
async _verifyPassword(user, password) {
|
|
758
|
-
const options = extractHashingOptions(
|
|
775
|
+
const options = (0, import_shared.extractHashingOptions)(
|
|
759
776
|
user[this.options.authFields.hashedPassword]
|
|
760
777
|
);
|
|
761
778
|
if (Object.keys(options).length) {
|
|
762
|
-
const [hashedPassword] = hashPassword(password, {
|
|
779
|
+
const [hashedPassword] = (0, import_shared.hashPassword)(password, {
|
|
763
780
|
salt: user[this.options.authFields.salt],
|
|
764
781
|
options
|
|
765
782
|
});
|
|
@@ -767,12 +784,12 @@ class DbAuthHandler {
|
|
|
767
784
|
return user;
|
|
768
785
|
}
|
|
769
786
|
} else {
|
|
770
|
-
const [legacyHashedPassword] = legacyHashPassword(
|
|
787
|
+
const [legacyHashedPassword] = (0, import_shared.legacyHashPassword)(
|
|
771
788
|
password,
|
|
772
789
|
user[this.options.authFields.salt]
|
|
773
790
|
);
|
|
774
791
|
if (legacyHashedPassword === user[this.options.authFields.hashedPassword]) {
|
|
775
|
-
const [newHashedPassword] = hashPassword(password, {
|
|
792
|
+
const [newHashedPassword] = (0, import_shared.hashPassword)(password, {
|
|
776
793
|
salt: user[this.options.authFields.salt]
|
|
777
794
|
});
|
|
778
795
|
await this.dbAccessor.update({
|
|
@@ -831,7 +848,7 @@ class DbAuthHandler {
|
|
|
831
848
|
this.options.signup?.errors?.usernameTaken
|
|
832
849
|
);
|
|
833
850
|
}
|
|
834
|
-
const [hashedPassword, salt] = hashPassword(password);
|
|
851
|
+
const [hashedPassword, salt] = (0, import_shared.hashPassword)(password);
|
|
835
852
|
const newUser = await this.options.signup.handler({
|
|
836
853
|
username,
|
|
837
854
|
hashedPassword,
|
|
@@ -909,6 +926,7 @@ class DbAuthHandler {
|
|
|
909
926
|
return findUniqueUserMatchCriteriaOptions;
|
|
910
927
|
}
|
|
911
928
|
}
|
|
912
|
-
export
|
|
929
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
930
|
+
0 && (module.exports = {
|
|
913
931
|
DbAuthHandler
|
|
914
|
-
};
|
|
932
|
+
});
|
package/dist/decoder.js
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var decoder_exports = {};
|
|
20
|
+
__export(decoder_exports, {
|
|
21
|
+
authDecoder: () => authDecoder,
|
|
22
|
+
createAuthDecoder: () => createAuthDecoder
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(decoder_exports);
|
|
25
|
+
var import_shared = require("./shared.js");
|
|
2
26
|
const createAuthDecoder = (cookieNameTemplate) => {
|
|
3
27
|
return async (_token, type, req) => {
|
|
4
28
|
if (type !== "dbAuth") {
|
|
5
29
|
return null;
|
|
6
30
|
}
|
|
7
|
-
const session = dbAuthSession(req.event, cookieNameTemplate);
|
|
31
|
+
const session = (0, import_shared.dbAuthSession)(req.event, cookieNameTemplate);
|
|
8
32
|
return session;
|
|
9
33
|
};
|
|
10
34
|
};
|
|
@@ -12,10 +36,11 @@ const authDecoder = async (_authHeaderValue, type, req) => {
|
|
|
12
36
|
if (type !== "dbAuth") {
|
|
13
37
|
return null;
|
|
14
38
|
}
|
|
15
|
-
const session = dbAuthSession(req.event, void 0);
|
|
39
|
+
const session = (0, import_shared.dbAuthSession)(req.event, void 0);
|
|
16
40
|
return session;
|
|
17
41
|
};
|
|
18
|
-
export
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
19
44
|
authDecoder,
|
|
20
45
|
createAuthDecoder
|
|
21
|
-
};
|
|
46
|
+
});
|
package/dist/errors.js
CHANGED
|
@@ -1,3 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var errors_exports = {};
|
|
20
|
+
__export(errors_exports, {
|
|
21
|
+
CsrfTokenMismatchError: () => CsrfTokenMismatchError,
|
|
22
|
+
DuplicateUsernameError: () => DuplicateUsernameError,
|
|
23
|
+
FieldRequiredError: () => FieldRequiredError,
|
|
24
|
+
FlowNotEnabledError: () => FlowNotEnabledError,
|
|
25
|
+
GenericError: () => GenericError,
|
|
26
|
+
IncorrectPasswordError: () => IncorrectPasswordError,
|
|
27
|
+
MissingWebAuthnConfigError: () => MissingWebAuthnConfigError,
|
|
28
|
+
NoForgotPasswordHandlerError: () => NoForgotPasswordHandlerError,
|
|
29
|
+
NoLoginHandlerError: () => NoLoginHandlerError,
|
|
30
|
+
NoResetPasswordHandlerError: () => NoResetPasswordHandlerError,
|
|
31
|
+
NoSessionExpirationError: () => NoSessionExpirationError,
|
|
32
|
+
NoSessionSecretError: () => NoSessionSecretError,
|
|
33
|
+
NoSignupHandlerError: () => NoSignupHandlerError,
|
|
34
|
+
NoUserIdError: () => NoUserIdError,
|
|
35
|
+
NoWebAuthnConfigError: () => NoWebAuthnConfigError,
|
|
36
|
+
NoWebAuthnSessionError: () => NoWebAuthnSessionError,
|
|
37
|
+
NotLoggedInError: () => NotLoggedInError,
|
|
38
|
+
PasswordRequiredError: () => PasswordRequiredError,
|
|
39
|
+
PasswordValidationError: () => PasswordValidationError,
|
|
40
|
+
ResetTokenExpiredError: () => ResetTokenExpiredError,
|
|
41
|
+
ResetTokenInvalidError: () => ResetTokenInvalidError,
|
|
42
|
+
ResetTokenRequiredError: () => ResetTokenRequiredError,
|
|
43
|
+
ReusedPasswordError: () => ReusedPasswordError,
|
|
44
|
+
SessionDecryptionError: () => SessionDecryptionError,
|
|
45
|
+
UnknownAuthMethodError: () => UnknownAuthMethodError,
|
|
46
|
+
UserNotFoundError: () => UserNotFoundError,
|
|
47
|
+
UsernameAndPasswordRequiredError: () => UsernameAndPasswordRequiredError,
|
|
48
|
+
UsernameNotFoundError: () => UsernameNotFoundError,
|
|
49
|
+
UsernameRequiredError: () => UsernameRequiredError,
|
|
50
|
+
WebAuthnError: () => WebAuthnError,
|
|
51
|
+
WrongVerbError: () => WrongVerbError
|
|
52
|
+
});
|
|
53
|
+
module.exports = __toCommonJS(errors_exports);
|
|
1
54
|
class NoSessionSecretError extends Error {
|
|
2
55
|
constructor() {
|
|
3
56
|
super(
|
|
@@ -196,7 +249,8 @@ class NoWebAuthnSessionError extends WebAuthnError {
|
|
|
196
249
|
this.name = "NoWebAuthnSessionError";
|
|
197
250
|
}
|
|
198
251
|
}
|
|
199
|
-
export
|
|
252
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
253
|
+
0 && (module.exports = {
|
|
200
254
|
CsrfTokenMismatchError,
|
|
201
255
|
DuplicateUsernameError,
|
|
202
256
|
FieldRequiredError,
|
|
@@ -228,4 +282,4 @@ export {
|
|
|
228
282
|
UsernameRequiredError,
|
|
229
283
|
WebAuthnError,
|
|
230
284
|
WrongVerbError
|
|
231
|
-
};
|
|
285
|
+
});
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var index_exports = {};
|
|
21
|
+
__export(index_exports, {
|
|
22
|
+
PasswordValidationError: () => import_errors.PasswordValidationError,
|
|
23
|
+
authDecoder: () => import_decoder.authDecoder,
|
|
24
|
+
createAuthDecoder: () => import_decoder.createAuthDecoder
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(index_exports);
|
|
27
|
+
__reExport(index_exports, require("./DbAuthHandler.js"), module.exports);
|
|
28
|
+
var import_errors = require("./errors.js");
|
|
29
|
+
__reExport(index_exports, require("./shared.js"), module.exports);
|
|
30
|
+
var import_decoder = require("./decoder.js");
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
6
33
|
PasswordValidationError,
|
|
7
34
|
authDecoder,
|
|
8
|
-
createAuthDecoder
|
|
9
|
-
|
|
35
|
+
createAuthDecoder,
|
|
36
|
+
...require("./DbAuthHandler.js"),
|
|
37
|
+
...require("./shared.js")
|
|
38
|
+
});
|
package/dist/shared.js
CHANGED
|
@@ -1,7 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var shared_exports = {};
|
|
30
|
+
__export(shared_exports, {
|
|
31
|
+
dbAuthSession: () => dbAuthSession,
|
|
32
|
+
decryptSession: () => decryptSession,
|
|
33
|
+
encryptSession: () => encryptSession,
|
|
34
|
+
extractCookie: () => extractCookie,
|
|
35
|
+
extractHashingOptions: () => extractHashingOptions,
|
|
36
|
+
generateCookieName: () => generateCookieName,
|
|
37
|
+
getDbAuthResponseBuilder: () => getDbAuthResponseBuilder,
|
|
38
|
+
getSession: () => getSession,
|
|
39
|
+
hashPassword: () => hashPassword,
|
|
40
|
+
hashToken: () => hashToken,
|
|
41
|
+
isLegacySession: () => isLegacySession,
|
|
42
|
+
legacyHashPassword: () => legacyHashPassword,
|
|
43
|
+
webAuthnSession: () => webAuthnSession
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(shared_exports);
|
|
46
|
+
var import_node_crypto = __toESM(require("node:crypto"));
|
|
47
|
+
var import_api = require("@cedarjs/api");
|
|
48
|
+
var import_project_config = require("@cedarjs/project-config");
|
|
49
|
+
var DbAuthError = __toESM(require("./errors.js"));
|
|
5
50
|
const DEFAULT_SCRYPT_OPTIONS = {
|
|
6
51
|
cost: 2 ** 14,
|
|
7
52
|
blockSize: 8,
|
|
@@ -9,17 +54,17 @@ const DEFAULT_SCRYPT_OPTIONS = {
|
|
|
9
54
|
};
|
|
10
55
|
const getPort = () => {
|
|
11
56
|
try {
|
|
12
|
-
getConfigPath();
|
|
57
|
+
(0, import_project_config.getConfigPath)();
|
|
13
58
|
} catch {
|
|
14
59
|
return 8911;
|
|
15
60
|
}
|
|
16
|
-
return getConfig().api.port;
|
|
61
|
+
return (0, import_project_config.getConfig)().api.port;
|
|
17
62
|
};
|
|
18
63
|
const eventGraphiQLHeadersCookie = (event) => {
|
|
19
64
|
if (process.env.NODE_ENV !== "development") {
|
|
20
65
|
return;
|
|
21
66
|
}
|
|
22
|
-
const impersationationHeader = getEventHeader(
|
|
67
|
+
const impersationationHeader = (0, import_api.getEventHeader)(
|
|
23
68
|
event,
|
|
24
69
|
"rw-studio-impersonation-cookie"
|
|
25
70
|
);
|
|
@@ -27,7 +72,7 @@ const eventGraphiQLHeadersCookie = (event) => {
|
|
|
27
72
|
return impersationationHeader;
|
|
28
73
|
}
|
|
29
74
|
try {
|
|
30
|
-
if (!isFetchApiRequest(event)) {
|
|
75
|
+
if (!(0, import_api.isFetchApiRequest)(event)) {
|
|
31
76
|
const jsonBody = JSON.parse(event.body ?? "{}");
|
|
32
77
|
return jsonBody?.extensions?.headers?.cookie || jsonBody?.extensions?.headers?.Cookie;
|
|
33
78
|
}
|
|
@@ -45,17 +90,17 @@ const legacyDecryptSession = (encryptedText) => {
|
|
|
45
90
|
const md5Hashes = [];
|
|
46
91
|
let digest = password;
|
|
47
92
|
for (let i = 0; i < 3; i++) {
|
|
48
|
-
md5Hashes[i] =
|
|
93
|
+
md5Hashes[i] = import_node_crypto.default.createHash("md5").update(digest).digest();
|
|
49
94
|
digest = Buffer.concat([md5Hashes[i], password]);
|
|
50
95
|
}
|
|
51
96
|
const key = Buffer.concat([md5Hashes[0], md5Hashes[1]]);
|
|
52
97
|
const iv = md5Hashes[2];
|
|
53
98
|
const contents = cypher.slice(16);
|
|
54
|
-
const decipher =
|
|
99
|
+
const decipher = import_node_crypto.default.createDecipheriv("aes-256-cbc", key, iv);
|
|
55
100
|
return decipher.update(contents) + decipher.final("utf-8");
|
|
56
101
|
};
|
|
57
102
|
const extractCookie = (event) => {
|
|
58
|
-
return eventGraphiQLHeadersCookie(event) || getEventHeader(event, "Cookie");
|
|
103
|
+
return eventGraphiQLHeadersCookie(event) || (0, import_api.getEventHeader)(event, "Cookie");
|
|
59
104
|
};
|
|
60
105
|
const isLegacySession = (text) => {
|
|
61
106
|
if (!text) {
|
|
@@ -72,7 +117,7 @@ const decryptSession = (text) => {
|
|
|
72
117
|
const [encryptedText, iv] = text.split("|");
|
|
73
118
|
try {
|
|
74
119
|
if (iv) {
|
|
75
|
-
const decipher =
|
|
120
|
+
const decipher = import_node_crypto.default.createDecipheriv(
|
|
76
121
|
"aes-256-cbc",
|
|
77
122
|
process.env.SESSION_SECRET.substring(0, 32),
|
|
78
123
|
Buffer.from(iv, "base64")
|
|
@@ -89,8 +134,8 @@ const decryptSession = (text) => {
|
|
|
89
134
|
}
|
|
90
135
|
};
|
|
91
136
|
const encryptSession = (dataString) => {
|
|
92
|
-
const iv =
|
|
93
|
-
const cipher =
|
|
137
|
+
const iv = import_node_crypto.default.randomBytes(16);
|
|
138
|
+
const cipher = import_node_crypto.default.createCipheriv(
|
|
94
139
|
"aes-256-cbc",
|
|
95
140
|
process.env.SESSION_SECRET.substring(0, 32),
|
|
96
141
|
iv
|
|
@@ -137,13 +182,13 @@ const webAuthnSession = (event) => {
|
|
|
137
182
|
return webAuthnCookie.split("=")[1].trim();
|
|
138
183
|
};
|
|
139
184
|
const hashToken = (token) => {
|
|
140
|
-
return
|
|
185
|
+
return import_node_crypto.default.createHash("sha256").update(token).digest("hex");
|
|
141
186
|
};
|
|
142
187
|
const hashPassword = (text, {
|
|
143
|
-
salt =
|
|
188
|
+
salt = import_node_crypto.default.randomBytes(32).toString("hex"),
|
|
144
189
|
options = DEFAULT_SCRYPT_OPTIONS
|
|
145
190
|
} = {}) => {
|
|
146
|
-
const encryptedString =
|
|
191
|
+
const encryptedString = import_node_crypto.default.scryptSync(text.normalize("NFC"), salt, 32, options).toString("hex");
|
|
147
192
|
const optionsToString = [
|
|
148
193
|
options.cost,
|
|
149
194
|
options.blockSize,
|
|
@@ -152,9 +197,9 @@ const hashPassword = (text, {
|
|
|
152
197
|
return [`${encryptedString}|${optionsToString.join("|")}`, salt];
|
|
153
198
|
};
|
|
154
199
|
const legacyHashPassword = (text, salt) => {
|
|
155
|
-
const useSalt = salt ||
|
|
200
|
+
const useSalt = salt || import_node_crypto.default.randomBytes(32).toString("hex");
|
|
156
201
|
return [
|
|
157
|
-
|
|
202
|
+
import_node_crypto.default.pbkdf2Sync(text, useSalt, 1, 32, "SHA1").toString("hex"),
|
|
158
203
|
useSalt
|
|
159
204
|
];
|
|
160
205
|
};
|
|
@@ -205,7 +250,8 @@ const extractHashingOptions = (text) => {
|
|
|
205
250
|
return {};
|
|
206
251
|
}
|
|
207
252
|
};
|
|
208
|
-
export
|
|
253
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
254
|
+
0 && (module.exports = {
|
|
209
255
|
dbAuthSession,
|
|
210
256
|
decryptSession,
|
|
211
257
|
encryptSession,
|
|
@@ -219,4 +265,4 @@ export {
|
|
|
219
265
|
isLegacySession,
|
|
220
266
|
legacyHashPassword,
|
|
221
267
|
webAuthnSession
|
|
222
|
-
};
|
|
268
|
+
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/auth-dbauth-api",
|
|
3
|
-
"version": "5.0.7
|
|
3
|
+
"version": "5.0.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
7
7
|
"directory": "packages/auth-providers/dbAuth/api"
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"type": "
|
|
10
|
+
"type": "commonjs",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"default": {
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"dist"
|
|
47
47
|
],
|
|
48
48
|
"scripts": {
|
|
49
|
-
"build": "node ./build.mts",
|
|
49
|
+
"build": "node ./build.mts && yarn build:types",
|
|
50
50
|
"build:pack": "yarn pack -o cedarjs-auth-dbauth-api.tgz",
|
|
51
|
-
"build:types": "tsc --build --verbose ./tsconfig.
|
|
51
|
+
"build:types": "tsc --build --verbose ./tsconfig.json",
|
|
52
52
|
"build:watch": "nodemon --watch src --ext \"js,jsx,ts,tsx,template\" --ignore dist --exec \"yarn build\"",
|
|
53
53
|
"check:attw": "yarn cedar-fwtools-attw",
|
|
54
54
|
"check:package": "concurrently npm:check:attw yarn:publint",
|
|
@@ -57,21 +57,20 @@
|
|
|
57
57
|
"test:watch": "vitest watch"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@cedarjs/project-config": "5.0.7
|
|
60
|
+
"@cedarjs/project-config": "5.0.7",
|
|
61
61
|
"md5": "2.3.0",
|
|
62
62
|
"uuid": "11.1.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@
|
|
66
|
-
"@cedarjs/
|
|
65
|
+
"@arethetypeswrong/cli": "0.18.4",
|
|
66
|
+
"@cedarjs/api": "5.0.7",
|
|
67
|
+
"@cedarjs/framework-tools": "5.0.7",
|
|
67
68
|
"@simplewebauthn/server": "10.0.1",
|
|
68
|
-
"@simplewebauthn/types": "10.0.0",
|
|
69
|
-
"@types/aws-lambda": "8.10.162",
|
|
70
69
|
"@types/md5": "2.3.6",
|
|
71
70
|
"concurrently": "9.2.4",
|
|
72
|
-
"publint": "0.3.
|
|
71
|
+
"publint": "0.3.21",
|
|
73
72
|
"typescript": "5.9.3",
|
|
74
|
-
"vitest": "
|
|
73
|
+
"vitest": "3.2.6"
|
|
75
74
|
},
|
|
76
75
|
"engines": {
|
|
77
76
|
"node": ">=24"
|