aloux-iam 0.0.57 → 0.0.59
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/lib/router.js +1 -1
- package/lib/services/auth.js +2 -0
- package/package.json +1 -1
package/lib/router.js
CHANGED
|
@@ -20,7 +20,7 @@ router.post('/iam/auth/signup', auth.createCustomer)
|
|
|
20
20
|
|
|
21
21
|
// User / user self
|
|
22
22
|
router.get('/iam/auth/me', middleware, auth.me)
|
|
23
|
-
router.
|
|
23
|
+
router.patch('/iam/auth/profile', middleware, auth.updateAny)
|
|
24
24
|
router.put('/iam/auth/profile/pictura', middleware, auth.updatePicture)
|
|
25
25
|
router.put('/iam/auth/reset/password', middleware, auth.resetPass)
|
|
26
26
|
router.post('/iam/auth/send/verify/phone', middleware, auth.verifyPhone)
|
package/lib/services/auth.js
CHANGED
|
@@ -374,6 +374,7 @@ self.verifyCode = async (req, res) => {
|
|
|
374
374
|
|
|
375
375
|
if (user.validateKey.resetPassword.resetCode == body.resetCode) {
|
|
376
376
|
user.validateKey.resetPassword.validCode = true
|
|
377
|
+
user.validateKey.validateEmail.emailVerified = true
|
|
377
378
|
await user.save()
|
|
378
379
|
}
|
|
379
380
|
else {
|
|
@@ -401,6 +402,7 @@ self.resetPassword = async (req, res) => {
|
|
|
401
402
|
usuario.validateKey.limitCodeTime = null
|
|
402
403
|
usuario.validateKey.resetPassword.resetCode = null
|
|
403
404
|
usuario.validateKey.resetPassword.validCode = false
|
|
405
|
+
usuario.validateKey.validateEmail.emailVerified = true
|
|
404
406
|
await usuario.save()
|
|
405
407
|
throw { code: 409, title: 'El código ha caducado.', detail: '', suggestion: 'Vuelve a intentarlo', error: new Error() }
|
|
406
408
|
}
|