浏览代码

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

正在加载...
取消
保存