Преглед изворни кода

:recycle: rearrange verification from url hash

brian_lifecycle_docs
j пре 2 година
родитељ
комит
9107da6c04
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3
    0
      frontend/src/views/VerifyView.vue

+ 3
- 0
frontend/src/views/VerifyView.vue Прегледај датотеку

15
             this.isHashInUrl(hash)
15
             this.isHashInUrl(hash)
16
             await this.verifyActiveSession(hash)
16
             await this.verifyActiveSession(hash)
17
             const sessionData = await authenticator.verifySessionCookie()
17
             const sessionData = await authenticator.verifySessionCookie()
18
+            if (!sessionData)
19
+                throw new Error(`Could not verify session from cookie.`)
18
             currentProfile.login(
20
             currentProfile.login(
19
                 sessionData.profileId,
21
                 sessionData.profileId,
20
                 this.$waveui.notify,
22
                 this.$waveui.notify,
33
             const sessionData = await authenticator.verifySession(hashedToken)
35
             const sessionData = await authenticator.verifySession(hashedToken)
34
             if (!sessionData.hashesMatch)
36
             if (!sessionData.hashesMatch)
35
                 throw new Error('Hash is not in activeSessions!')
37
                 throw new Error('Hash is not in activeSessions!')
38
+            return sessionData
36
         },
39
         },
37
     },
40
     },
38
 }
41
 }

Loading…
Откажи
Сачувај