Explorar el Código

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

juan_spike
tomit4 hace 3 años
padre
commit
f59651629b
Se han modificado 2 ficheros con 22 adiciones y 0 borrados
  1. 21
    0
      frontend/src/views/OnboardingView.vue
  2. 1
    0
      frontend/src/views/VerifyView.vue

+ 21
- 0
frontend/src/views/OnboardingView.vue Ver fichero

47
 let accessToken = null
47
 let accessToken = null
48
 // import savesurveybyprofileid - call it on submit
48
 // import savesurveybyprofileid - call it on submit
49
 // paginate to save every steps answers
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
 export default {
70
 export default {
51
     name: 'OnboardingView',
71
     name: 'OnboardingView',
52
     components: {
72
     components: {
89
         if (sessionData) {
109
         if (sessionData) {
90
             this.userEmail = sessionData.payload.email
110
             this.userEmail = sessionData.payload.email
91
             this.emailIsRegistered =
111
             this.emailIsRegistered =
112
+                // QUESTION: Would this logic also be needed in VerifyView??
92
                 await this.authenticator.checkIfEmailIsRegistered(
113
                 await this.authenticator.checkIfEmailIsRegistered(
93
                     this.userEmail,
114
                     this.userEmail,
94
                 )
115
                 )

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

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

Loading…
Cancelar
Guardar