Explorar el Código

:recycle: rearrange verification from url hash

brian_lifecycle_docs
j hace 2 años
padre
commit
9107da6c04
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3
    0
      frontend/src/views/VerifyView.vue

+ 3
- 0
frontend/src/views/VerifyView.vue Ver fichero

@@ -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…
Cancelar
Guardar