querySnapshotToObject in @next-auth/[email protected] returns undefined createTime and updateTime #5318
Unanswered
jordanatstable
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This may be a dumb question, but I cannot see a solution without a major update to our entire project.
After debugging the code I noticed that the adapter, in leveraging Firebase JS SDK which does not return create time and update time, breaks the adapter when verifying a sign-in via email, specifically on the
querySnapshotToObject
call. The fields forcreateTime
andupdateTime
is undefined...Specifically:
https://next-auth.js.org/errors#signin_email_error TypeError: Cannot read property 'toDate' of undefined at Object.docSnapshotToObject (/Users/mrlewis/Development/stable2.0/stable/node_modules/@next-auth/firebase-adapter/dist/utils.js:20:40) at createVerificationRequest (/Users/mrlewis/Development/stable2.0/stable/node_modules/@next-auth/firebase-adapter/dist/index.js:175:36)
Has anyone ran into this? Is there a specific version of the Firebase SDK that returns these fields? If not, I do not see how the adapter release noted ever worked.
Any help would be greatly appreciated 😄
"firebase": "^7.13.2-canary.bc39eb5b"
"@next-auth/firebase-adapter": "0.0.2-pr.97.150"
"next": "^9.4.1"
"next-auth": "^3.14.6"
"node": "10.13.0"
Beta Was this translation helpful? Give feedback.
All reactions