Description
When an admin creates a new user (or force-resets their password), the portal should display a downloadable Formulus QR code containing the server URL, username, and plaintext password. This removes the need to run synk qr or formulus/scripts/generateQR.ts manually and lets the admin copy/send credentials to the user in one step.
The QR must only be shown at the moment the plaintext password is still known - it must not be stored or retrievable later.
Problem
Today, onboarding a Formulus user requires:
- Creating the user in the Synkronus Portal (
synkronus-portal)
- Separately generating a QR code via the CLI (
synk qr) or the Formulus script (npm run generate_qr)
That extra CLI step is awkward for admins who already work in the portal. After user creation, the portal only shows a success toast and closes the modal, the plaintext password is discarded immediately:
The same applies to admin password reset (handleResetPassword): success message, form cleared, modal closed — no QR.
On the backend, passwords are hashed on create/reset and never returned again, which is correct for security:
Proposed solution
After a successful Create User or Admin Reset Password action, show a one-time success screen/modal that includes:
- Username
- Password (plaintext, shown once — same security model as today, but surfaced briefly for handoff)
- QR code image encoding FRMLS settings for Formulus
- Download QR button (PNG)
- Clear copy explaining this is shown once and cannot be retrieved later
When to show the QR
| Event |
Show QR? |
| Admin creates a new user |
Yes |
| Admin force-resets a user's password |
Yes |
| User changes their own password |
No |
| Viewing an existing user later |
No |
Security constraints (non-negotiable)
- QR contains the unencrypted password (required by Formulus scan flow).
- Because passwords are hashed server-side and never stored in plaintext, the QR can only be generated client-side while the plaintext password is still in memory from the form submission.
- The QR/password must not be persisted in localStorage, sessionStorage, the backend, or any user record.
- Closing/dismissing the modal should discard the credentials from React state.
- No API endpoint should ever return or regenerate a user's plaintext password.
QR image generation
Include the CLI’s logo overlay (qr_logo.png) though functional QR is the priority.
Acceptance criteria
Test plan
- Create a new user in the portal → confirm QR appears, scan with Formulus → app configures server URL + credentials and can log in.
- Reset a user’s password as admin → confirm QR appears with the new password; old QR/password no longer works.
- Close the success modal → reopen user management → confirm QR/password are not shown again.
- Change own password as a non-admin → confirm no QR is shown.
- Download PNG → confirm file scans correctly in Formulus.
Description
When an admin creates a new user (or force-resets their password), the portal should display a downloadable Formulus QR code containing the server URL, username, and plaintext password. This removes the need to run
synk qrorformulus/scripts/generateQR.tsmanually and lets the admin copy/send credentials to the user in one step.The QR must only be shown at the moment the plaintext password is still known - it must not be stored or retrievable later.
Problem
Today, onboarding a Formulus user requires:
synkronus-portal)synk qr) or the Formulus script (npm run generate_qr)That extra CLI step is awkward for admins who already work in the portal. After user creation, the portal only shows a success toast and closes the modal, the plaintext password is discarded immediately:
The same applies to admin password reset (
handleResetPassword): success message, form cleared, modal closed — no QR.On the backend, passwords are hashed on create/reset and never returned again, which is correct for security:
Proposed solution
After a successful Create User or Admin Reset Password action, show a one-time success screen/modal that includes:
When to show the QR
Security constraints (non-negotiable)
QR image generation
Include the CLI’s logo overlay (
qr_logo.png) though functional QR is the priority.Acceptance criteria
Test plan