3. Username Validation
- Date: 2022-12-14
- Status: Accepted
Context
When a user is using the in-game panel, it acts like a device where only a simple input is available. The complex full keyboard layout does not provides a good UX. We have to consider the use of VR device where the sole input might be a mouse pointer.
In this context, a device grant flow was considered, but with Cognito it's a bit difficult to implement. The resources are limited and the Cloud Formation provided to give a working demo is not working by itself (the required infrastructure is quite complex).
Because we already ask Simbrief username of the user, an option is to validate this username from the user. Once validated, we could use this username to link additional information concerning this user.
Decision
An opt-in option will be provided to the user. In some settings page, one could provide its Simbrief username and ask to validate it. When validated, the user would have access to more features.
Consequences
For the validation, we will require some lightweight to store ephemeral data. It might be overkill to include another part in architecture only for this purpose, but for learning concerns it is beneficial.
The general ideas goes as follow: the validation will require to store a code sent to the client and user. When the Flight Plan is generated on Simbrief, the system will fetch it and validate that the code is included in the last flight plan.
The memory database has some interesting features for this use case with time-to-live for the code.