-
Notifications
You must be signed in to change notification settings - Fork 390
Can not get lastRefreshTime #887
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
Comments
Seems like a bug.
When we should be handling it like |
I think this is because of the way
|
It's returned from the server in a different format than the other timestamps. Fixes #887
You're both right; there's two bugs here. One with the way the time is parsed (lastRefreshAt is returned from the server differently then the other timestamps) and the other bug (or at least omission) is that the toJSON method doesn't report the lastRefreshTime. Actually, there's a third bug too: importing users does not record the lastRefreshTime. (Noticed that while looking at this bug.) The other two probably only apply to the node port, but this one likely applies to all 5. The incorrect parsing of lastRefreshedAt bugs me; I knew the time was returned by the backend differently, and I've even handled that correctly in the other ports (though will definitely need to go back and verify that now that I know I've missed this at least once). Unfortunately, javascript's Date constructor is too permissive, as were our tests. Had either been a little tighter, this would've been caught much earlier. I've adjusted the tests to require a tighter bound on the resulting timestamp. |
It's returned from the server in a different format than the other timestamps. Fixes #887
Thank you for the quick response and fix. Really appreciate it! |
* Properly parse the lastRefreshTime. It's returned from the server in a different format than the other timestamps. Fixes #887 * Add lastRefreshTime to UserMetadata toJSON method. See #887 * Don't specify lastRefreshTime in integration tests Since specifying this when importing users isn't supported.
[READ] Step 1: Are you in the right place?
yes
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
I can't retrieve the lastRefreshTime for any user. Tried for several users, both in the emulator and on the server, always with the same result.
Relevant Code:
The code above always writes the following to the console output respectively:
The text was updated successfully, but these errors were encountered: