@fonoster/identity 0.9.23 → 0.9.24
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.
|
@@ -75,7 +75,7 @@ function createExchangeCredentials(prisma, identityConfig) {
|
|
|
75
75
|
const isValidVerificationCode = (0, createIsValidVerificationCode_1.createIsValidVerificationCode)(prisma);
|
|
76
76
|
const exchangeCredentials = (call, callback) => __awaiter(this, void 0, void 0, function* () {
|
|
77
77
|
const { request } = call;
|
|
78
|
-
const { username: email, password,
|
|
78
|
+
const { username: email, password, twoFactorCode } = request;
|
|
79
79
|
logger.verbose("call to exchangeCredentials", { username: email });
|
|
80
80
|
const user = yield (0, createGetUserByEmail_1.createGetUserByEmail)(prisma)(email);
|
|
81
81
|
if (!user || user.password !== (password === null || password === void 0 ? void 0 : password.trim())) {
|
|
@@ -96,7 +96,7 @@ function createExchangeCredentials(prisma, identityConfig) {
|
|
|
96
96
|
const isValid = yield isValidVerificationCode({
|
|
97
97
|
type: verification_1.ContactType.EMAIL,
|
|
98
98
|
value: email,
|
|
99
|
-
code:
|
|
99
|
+
code: twoFactorCode
|
|
100
100
|
});
|
|
101
101
|
if (!isValid) {
|
|
102
102
|
return callback({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/identity",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"description": "Identity service for Fonoster",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"fonoster": "./dist/index.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@fonoster/common": "^0.9.
|
|
23
|
+
"@fonoster/common": "^0.9.24",
|
|
24
24
|
"@fonoster/logger": "^0.9.22",
|
|
25
25
|
"@fonoster/types": "^0.9.22",
|
|
26
26
|
"@grpc/grpc-js": "~1.10.6",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/jsonwebtoken": "^9.0.6"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "a6e16d9b8af8594e57d8b385b936cc2508546de1"
|
|
52
52
|
}
|