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

:memo: Made notes for tomorrow's meet with TOJ

juan_spike
tomit4 3 лет назад
Родитель
Сommit
f59651629b
2 измененных файлов: 22 добавлений и 0 удалений
  1. 21
    0
      frontend/src/views/OnboardingView.vue
  2. 1
    0
      frontend/src/views/VerifyView.vue

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

@@ -47,6 +47,26 @@ let sessionToken = null
47 47
 let accessToken = null
48 48
 // import savesurveybyprofileid - call it on submit
49 49
 // paginate to save every steps answers
50
+
51
+/* BRIAN'S NOTE: 
52
+I'll need help here. The logic is getting confusing.
53
+
54
+    1.  Right now both a session and access token are issued 
55
+        (session via Auth.vue, access from VerifyView.vue).
56
+
57
+    2.  There is also a hashedEmail object on the backend's app state:
58
+        {
59
+            hashedEmailString: expiration_in_milliseconds,
60
+            anotherhashedEmailString: expiration_in_milliseconds,
61
+        }
62
+
63
+    3.  The session, access tokens all have jwt expirations as well as cookie expirations
64
+
65
+    4.  Additionally, we have an expiration on each hashedEmail string...
66
+    5.  All the data points to check are here... 
67
+        I just can't quite think straight as of 07/09/2023 at 01:53:22
68
+*/
69
+
50 70
 export default {
51 71
     name: 'OnboardingView',
52 72
     components: {
@@ -89,6 +109,7 @@ export default {
89 109
         if (sessionData) {
90 110
             this.userEmail = sessionData.payload.email
91 111
             this.emailIsRegistered =
112
+                // QUESTION: Would this logic also be needed in VerifyView??
92 113
                 await this.authenticator.checkIfEmailIsRegistered(
93 114
                     this.userEmail,
94 115
                 )

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

@@ -40,6 +40,7 @@ export default {
40 40
                 ? cookies[`${cookieKey}`]
41 41
                 : undefined
42 42
         },
43
+        // QUESTION: This will likely be needed in OnboardingView.vue
43 44
         async getAccessToken(payload) {
44 45
             const accessToken = await this.authenticator.getJwt({
45 46
                 payload,

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