I am trying to check if user logging in for the first time or not in Firebase authentication. I do not wish to add another custom variable to keep things simple, so I want to rely on the user metadata returned: creationTime
and lastSignInTime
In their API reference: https://firebase.google.com/docs/reference/js/auth.usermetadata.md#usermetadata_interface there is no indication whether those two values are exactly the same the first time. So can anyone confirm this? can I rely on them?
If I recall correctly there may be a slight offset between the values, so it's best to check if they're within 100ms (or something equally reasonable) of each other.
Also see: