-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: store prefill in frontend for spcp/myinfo forms, enable prefill for SGID forms #3920
Conversation
src/public/modules/forms/base/directives/submit-form.directive.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to have more detailed documentation of the considerations behind this feature, perhaps in code comments or in a google doc? some questions which I thought through when reviewing:
- why do we use
'storedQuery'
as the sessionStorage key rather than just using the ObjectId? probably because we only one person can be logging in at a time in a given session, so we should only store one set of prefill params - then why have an ID at all, since we could just store the prefill params in sessionStorage and not pass anything to the backend? tbh I'm not 100% clear on this, but I imagine there's some security benefit which I missed (?) so would be good to document it
src/public/modules/forms/base/controllers/submit-form.client.controller.js
Show resolved
Hide resolved
src/public/modules/forms/base/directives/submit-form.directive.js
Outdated
Show resolved
Hide resolved
src/public/modules/forms/base/controllers/submit-form.client.controller.js
Show resolved
Hide resolved
src/public/modules/forms/base/controllers/submit-form.client.controller.js
Outdated
Show resolved
Hide resolved
src/public/modules/forms/base/controllers/submit-form.client.controller.js
Outdated
Show resolved
Hide resolved
src/public/modules/forms/base/controllers/submit-form.client.controller.js
Show resolved
Hide resolved
Yes, that's correct. will document.
The use of Will document |
sorry still don't understand this - in this case the 2nd time the user clicks login, we would see that the URL has no query parameters and hence clear the stored query, resulting in correct behaviour right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm other than previous comments!
Problem
state
of up to 255 charactersSolution
Others
Tests
storedQuery
has been deleted fromsessionStorage
storedQuery
has been deleted fromsessionStorage