Skip to content

Commit

Permalink
Adjustments to syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewTurk247 committed Jun 13, 2024
1 parent 8405eb1 commit d7d0701
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spezi-invitation-code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SPDX-License-Identifier: MIT

Our Firestore instance also contains a collection called `invitationCodes` with a fixed set of secret, randomly generated codes. During onboarding, we sign the user in anonymously so we can check if they have a valid code. If they do, we assign that code to their new de-anonymized account and remove it from `invitationCodes` so it cannot be used again. This system is designed to hedge against spam and unapproved use.

```mermaid
graph TD
start["Welcome Screen(s)"]
in1["Invitation Code View"]
Expand All @@ -36,6 +37,7 @@ graph TD
credentials --> credvalidation
credvalidation -->|No| login
credvalidation -->|Yes| home
```

Anytime someone tries to sign up for an account, a blocking cloud function will automatically be triggered, denying sign-up access to users who enter invalid invitation codes.
Since the Firebase instance is set up only to accept authenticated requests, this system eliminates the ability for anyone without an invitation code to send samples to our servers.

0 comments on commit d7d0701

Please sign in to comment.