Skip to content
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

Add possibility to generate URLs that set card code after registration #111

Open
ondryaso opened this issue Mar 12, 2022 · 0 comments
Open
Labels
enhancement New feature or request frontend A frontend-related issue

Comments

@ondryaso
Copy link
Member

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.
@ondryaso ondryaso added enhancement New feature or request frontend A frontend-related issue labels Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend A frontend-related issue
Projects
None yet
Development

No branches or pull requests

1 participant