In (near:tm:) future, there will be a thermal printer in the club. We could also use it in the registration workflow.
Currently, a person comes to the bar, taps their card which generates a registration code in KIS that the barman writes on a piece of paper with a QR code to Kachna Online's homepage and instructions.
With the printer available, the KIS frontend could print out a piece of paper with the QR code that would contain the generated registration code in its URL. When this URL is opened, the code would be saved to a local storage and when the user completes their registration, the app would automatically send a KIS card pairing request with the code saved in the local storage.
Changes needed in KO:
When the homepage is opened with ?cardCode=XXXXX in the URL's query:
Either save that field to sessionStorage; or
send it to KIS immediately if the user is already logged in (this must be done only after we know for sure that the current KIS access token is valid).
When the user confirms their registration (and thus logs in), send that to the KIS /users/me/rfid endpoint, just like if they typed it into the Kód karty field in the profile page. Clear the sessionStorage field.
If the request fails, show an error message prompting the user to try it again manually or to ask for a new code at the bar.
In (near:tm:) future, there will be a thermal printer in the club. We could also use it in the registration workflow.
Currently, a person comes to the bar, taps their card which generates a registration code in KIS that the barman writes on a piece of paper with a QR code to Kachna Online's homepage and instructions.
With the printer available, the KIS frontend could print out a piece of paper with the QR code that would contain the generated registration code in its URL. When this URL is opened, the code would be saved to a local storage and when the user completes their registration, the app would automatically send a KIS card pairing request with the code saved in the local storage.
Changes needed in KO:
?cardCode=XXXXX
in the URL's query:sessionStorage
; or/users/me/rfid
endpoint, just like if they typed it into the Kód karty field in the profile page. Clear thesessionStorage
field.