Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

User lastSignedIn and signedIn info sometimes written in wrong location #53

Open
will-hou opened this issue Jan 24, 2020 · 1 comment
Open
Labels

Comments

@will-hou
Copy link
Member

The attendance app crashed today (after many sign-ins and proper functioning in the past few weeks), and I found lastSignedIn and signedIn as entries under /users, which is not supposed to happen.

This bug will break the application until the entry is deleted manually in the real-time database. Haven't gotten to investigate what's causing it but something in the code after moving to the new DB probably wasn't set up correctly.

Will wait until after the build season to look into this further because it happens so rarely and is relatively easy to fix.

@will-hou will-hou added the bug label Jan 24, 2020
@andrewda
Copy link
Member

Sounds like someone somehow entered a username that got evaluated to undefined or null or an empty string. Then it would try to put the entry in /users//lastSignedIn, which firebase would automatically simplify to /users/lastSignedIn. You can probably at a check somewhere (be it in firebase rules or in this code) to ensure the user isn't falsey.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants