Skip to content

Commit

Permalink
Fix timestamp format in Auth Emulator events. Fix #3093.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchenshi committed Apr 27, 2022
1 parent c8fc639 commit a4c4f07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Updates `superstatic` to `v8` to fix audit issues.
- Make grantToken tenant-aware (#4475)
- Fix database emulator rules error parsing (#4454).
- Fix timestamp format in Auth Emulator events (#3093).
8 changes: 6 additions & 2 deletions src/emulator/auth/cloudFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,12 @@ export class AuthCloudFunction {
phoneNumber: user.phoneNumber,
disabled: user.disabled,
metadata: {
creationTime: user.createdAt,
lastSignInTime: user.lastLoginAt,
creationTime: user.createdAt
? new Date(parseInt(user.createdAt, 10)).toISOString()
: undefined,
lastSignInTime: user.lastLoginAt
? new Date(parseInt(user.lastLoginAt, 10)).toISOString()
: undefined,
},
customClaims: JSON.parse(user.customAttributes || "{}"),
providerData: user.providerUserInfo,
Expand Down

0 comments on commit a4c4f07

Please sign in to comment.