Просмотр исходного кода

:construction: Incorporated changes of juan_spike into brian_dev_111

juan_spike
tomit4 2 лет назад
Родитель
Сommit
89a8924192

+ 0
- 1
backend/lib/routes/user/validatesession.js Просмотреть файл

28
             const hashedSessionToken = request.payload
28
             const hashedSessionToken = request.payload
29
             const { userService } = request.server.services()
29
             const { userService } = request.server.services()
30
             try {
30
             try {
31
-                // const validatedSessionToken = userService.validateToken(sessionToken)
32
                 const validatedSessionToken =
31
                 const validatedSessionToken =
33
                     userService.validateSession(hashedSessionToken)
32
                     userService.validateSession(hashedSessionToken)
34
                 return {
33
                 return {

+ 1
- 1
backend/lib/services/user.js Просмотреть файл

361
                     email: userCredentials.email,
361
                     email: userCredentials.email,
362
                 },
362
                 },
363
             ],
363
             ],
364
-            templateId: 2,
364
+            templateId: 1,
365
             params: {
365
             params: {
366
                 // TODO: Change this in production...
366
                 // TODO: Change this in production...
367
                 link: `localhost:3000/verify/${hashedSessionToken}`,
367
                 link: `localhost:3000/verify/${hashedSessionToken}`,

+ 1
- 0
frontend/src/entities/survey/survey.answer.validator.js Просмотреть файл

10
     // TODO: change to valdate against JWT??
10
     // TODO: change to valdate against JWT??
11
     auth: Joi.any(),
11
     auth: Joi.any(),
12
 
12
 
13
+    // TODO: Uncomment when ease of development no longer needed
13
     // password: Joi.string().min(10).max(30).pattern(new RegExp('[a-zA-Z0-9]+')),
14
     // password: Joi.string().min(10).max(30).pattern(new RegExp('[a-zA-Z0-9]+')),
14
     password: Joi.string().max(30).pattern(new RegExp('[a-zA-Z0-9]+')),
15
     password: Joi.string().max(30).pattern(new RegExp('[a-zA-Z0-9]+')),
15
     // TODO: Change if going international (only works in usa)
16
     // TODO: Change if going international (only works in usa)

+ 0
- 2
frontend/src/views/VerifyView.vue Просмотреть файл

47
             if (!hashedSessionToken)
47
             if (!hashedSessionToken)
48
                 throw new Error('sessionToken not in cookie store!')
48
                 throw new Error('sessionToken not in cookie store!')
49
         },
49
         },
50
-        // TODO: Next is to put this into OnboardingView
51
-        // TODO: validate routes using sole SessionToken Grabbed from hash in cookie
52
         async verifyActiveSession(hashedToken) {
50
         async verifyActiveSession(hashedToken) {
53
             const sessionData = await this.authenticator.verifyAuthSession(
51
             const sessionData = await this.authenticator.verifyAuthSession(
54
                 hashedToken,
52
                 hashedToken,

Загрузка…
Отмена
Сохранить