Bläddra i källkod

:pencil2: Removed secure attribute from auth cookie

tags/0.0.4
tomit4 2 år sedan
förälder
incheckning
e66ef2e09d

+ 1
- 1
frontend/src/components/onboarding/Auth.vue Visa fil

51
                 ...this.answered,
51
                 ...this.answered,
52
                 sessionToken: sessionToken,
52
                 sessionToken: sessionToken,
53
             })
53
             })
54
-            document.cookie = `siimee_session=${sessionInfo.hashedSessionToken}; max-age=600; path=/; secure`
54
+            document.cookie = `siimee_session=${sessionInfo.hashedSessionToken}; max-age=600; path=/`
55
         } catch (err) {
55
         } catch (err) {
56
             // TODO: render an error page in this component displaying which
56
             // TODO: render an error page in this component displaying which
57
             // error occurred and how to reach out to staff
57
             // error occurred and how to reach out to staff

+ 1
- 1
frontend/src/views/HomeView.vue Visa fil

106
             )
106
             )
107
             if (removedSession.error)
107
             if (removedSession.error)
108
                 console.error('ERROR :=>', removedSession.error)
108
                 console.error('ERROR :=>', removedSession.error)
109
-            document.cookie = `siimee_session=''; max-age=0; path=/; secure`
109
+            document.cookie = `siimee_session=''; max-age=0; path=/`
110
             this.$router.push('/onboarding')
110
             this.$router.push('/onboarding')
111
         },
111
         },
112
         // this can be placed in utils/notification.js
112
         // this can be placed in utils/notification.js

+ 17
- 4
frontend/src/views/LoginView.vue Visa fil

3
     article.pa12
3
     article.pa12
4
         div(v-if='emailSentSuccessfully === null')
4
         div(v-if='emailSentSuccessfully === null')
5
             form
5
             form
6
-                w-input.mb4(label="User E-mail" tile outline v-model="form.email" inner-icon-left='icon-envelope')
7
-                w-input(label="Password" v-model="form.password" type="password" tile outline inner-icon-left='icon-eye')
8
-                w-button.xs12.mt12(@click="login") submit
6
+                w-input.mb4(
7
+                    inner-icon-left='icon-envelope'
8
+                    label='User E-mail'
9
+                    outline
10
+                    tile
11
+                    v-model='form.email'
12
+                )
13
+                w-input(
14
+                    inner-icon-left='icon-eye'
15
+                    label='Password'
16
+                    outline
17
+                    tile
18
+                    type='password'
19
+                    v-model='form.password'
20
+                )
21
+                w-button.xs12.mt12(@click='login') submit
9
         div(v-else-if='emailSentSuccessfully === false')
22
         div(v-else-if='emailSentSuccessfully === false')
10
             p.verify-message Email Was Not Sent Successfully, please contact your Email Service Provider or Systems Administrator.
23
             p.verify-message Email Was Not Sent Successfully, please contact your Email Service Provider or Systems Administrator.
11
         div(v-else)
24
         div(v-else)
42
             if (sessionInfo.emailSentSuccessfully) {
55
             if (sessionInfo.emailSentSuccessfully) {
43
                 this.emailSentSuccessfully = true
56
                 this.emailSentSuccessfully = true
44
             }
57
             }
45
-            document.cookie = `siimee_session=${sessionInfo.hashedSessionToken}; max-age=600; path=/; secure`
58
+            document.cookie = `siimee_session=${sessionInfo.hashedSessionToken}; max-age=600; path=/`
46
         },
59
         },
47
     },
60
     },
48
 }
61
 }

Laddar…
Avbryt
Spara