소스 검색

: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
 }

Loading…
취소
저장