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
Inconsistent documentation about creationTime #3093
Comments
Hi, thanks for reaching out. I believe this is unrelated to the emulator UI. I'm going to transfer this issue over to the emulator suite |
update: I have verified that the live version of firebase auth presents the |
Would you mind posting some code about how you retrieved the user and |
Run this cloud function in the emulator and against a real system and you will see the difference import * as functions from 'firebase-functions';
export default functions.auth.user().onDelete(async (user) => {
functions.logger.info(user.metadata.creationTime, typeof user.metadata.creationTime)
}) |
Can confirm that this is still an issue. |
Hi all, thanks for the input. It is now clear that the problem is with the Firebase Auth emulator and I'll track this as a bug. PRs welcome too. (Previously, I got a bit confused and did not triage this in time since OP mentions "firestore" but this has nothing to do with Firestore. My apologies.) |
I posted a bug report to firebase-functions, as it showed up on upgrading, but I think it might be related to this one. I have an |
Maybe I am looking at an old version of the documentation and I don't know it yet.
The firestore documentation says that the
creationTime
on the auth.UserMetadata object should be a formatted UTC string of the date.https://firebase.google.com/docs/reference/admin/node/admin.auth.UserMetadata#creationtime
And if you look at the definition for the
lastRefreshTime
it elaborates on a UTC string as "eg 'Sat, 03 Feb 2001 04:05:06 GMT'"However, when I verify this by retrieving the
creationTime
from a functions trigger running on my emulator, the resulting value is a string of the millisecond timestamp.Is that expected? Is that the same behavior I should expect when running in a live environment? I haven't tried it live yet, but I will update this ticket if I notice an inconsistency.
What I am ultimately asking for is clarification within the documentation itself, because it is confusing.
Thanks!
The text was updated successfully, but these errors were encountered: