Commit b4c18e3
authored
feat: sgID to MyInfo migration (#1167)
## Problem
FormSG is doing a deprecation of sgID authentication and moving towards
Singpass/MyInfo authentication. As a result the field `sgidUinFin` will
be replaced by `uinFin`. This will break existing pipes that rely on
that variable.
## Solution
To maintain backwards compatibility and to ensure that current pipes do
not break, we have to duplicate `uinFin` to `sgidUinFin`. And to hide
one of `sgidUinFin` variable in the variable list and suggestions popper
so users dont get confused.
This PR introduces another metadata key called `isHiddenFromList`. If
true, this variable will not appear in the variable list but will still
render properly if the variable is already selected and in use.
### Screenshots
1. Hidden from variable list
<img width="406" height="219" alt="image"
src="https://github.com/user-attachments/assets/be0591a1-85ba-4b79-96fa-678f8c76b16f"
/>
2. Both variables (`uinFin` and `sgidUinFin` still displays properly)
<img width="956" height="416" alt="image"
src="https://github.com/user-attachments/assets/598fef6d-0e12-46e5-aa3a-fec3addc4d1a"
/>1 parent 43bdd16 commit b4c18e3
File tree
7 files changed
+40
-30
lines changed- packages
- backend/src/apps/formsg
- __tests__/auth
- auth
- triggers/new-submission
- frontend/src
- components/VariablesList
- helpers
- types
7 files changed
+40
-30
lines changedLines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | 282 | | |
284 | 283 | | |
285 | 284 | | |
| |||
313 | 312 | | |
314 | 313 | | |
315 | 314 | | |
316 | | - | |
| 315 | + | |
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
| |||
371 | 370 | | |
372 | 371 | | |
373 | 372 | | |
374 | | - | |
| 373 | + | |
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
| |||
407 | 406 | | |
408 | 407 | | |
409 | 408 | | |
410 | | - | |
| 409 | + | |
411 | 410 | | |
412 | 411 | | |
413 | 412 | | |
| |||
426 | 425 | | |
427 | 426 | | |
428 | 427 | | |
429 | | - | |
430 | 428 | | |
431 | 429 | | |
432 | 430 | | |
| |||
438 | 436 | | |
439 | 437 | | |
440 | 438 | | |
441 | | - | |
| 439 | + | |
442 | 440 | | |
443 | 441 | | |
444 | 442 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | 197 | | |
194 | 198 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
| |||
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
237 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
| |||
Lines changed: 6 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
51 | 46 | | |
| 47 | + | |
| 48 | + | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
| 52 | + | |
55 | 53 | | |
56 | 54 | | |
57 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
| |||
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
168 | | - | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 27 | + | |
33 | 28 | | |
34 | 29 | | |
35 | 30 | | |
| |||
38 | 33 | | |
39 | 34 | | |
40 | 35 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 36 | | |
48 | 37 | | |
49 | 38 | | |
| |||
83 | 72 | | |
84 | 73 | | |
85 | 74 | | |
| 75 | + | |
86 | 76 | | |
87 | 77 | | |
88 | 78 | | |
| |||
99 | 89 | | |
100 | 90 | | |
101 | 91 | | |
| 92 | + | |
102 | 93 | | |
103 | 94 | | |
104 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
| |||
0 commit comments