GET_SESSION_ERROR with Fauna DB #1018
-
I have created a brand new DB on Fauna and set it up using details from this thread. For now, I am just testing with the next-auth Email provider. The verification_requests collection in Fauna DB is populating with data when I request the login link, but I'm getting a GET_SESSION_ERROR in terminal when using the login link received via email and the login doesn't work. Note that the session collection in Fauna never gets populated with session data, hence the GET_SESSION_ERROR I suppose. Anyways, has anyone used the Fauna adapter with the Email provider and has it working? I have the Email provider working with Prisma/MySql but can't get it to work with Fauna. Error details:
Below is the script I'm using to populate Fauna DB via the Fauna shell. Create collections:
Then create indexes:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Ok. I think i came across this issue once.
|
Beta Was this translation helpful? Give feedback.
-
Hi @taylorhlabs , I saw you were having trouble in the PR and have tested things out my end. The Email provider is working with FaunaDB, I can send emails from my app and sign in using the magic link provided in the email. Your setup looks correct. Are you able to manually query the index from the Fauna dashboard? Appreciate you found the typo in the original setup script, I'll update the PR comment in case others come by it until documentation is available. Can you verify if any data is being populated at all from the Fauna dashboard also? You say it seems like data is not being populated into the collection, but is that actually the case? |
Beta Was this translation helpful? Give feedback.
-
Hey @Joev- thanks for chiming in. I can confirm that data is populating to the verification_request collection in Fauna just by looking at the collection in the dashboard Collections UI. I didn't try manually querying it though. I just ran a side by side debug with Prisma (working) and Fauna (not working). In the Fauna terminal, after Do you suspect there is something up with the index or query in Fauna? Can we assume |
Beta Was this translation helpful? Give feedback.
Hey @Joev- thanks for chiming in. I can confirm that data is populating to the verification_request collection in Fauna just by looking at the collection in the dashboard Collections UI. I didn't try manually querying it though.
I just ran a side by side debug with Prisma (working) and Fauna (not working). In the Fauna terminal, after
getuserbyemail
fires you can see thatgetsession
fires before the user is created and a session is created. In the Prisma example, a user and session are created beforegetsession
.Do you suspect there is something up with the index or query in Fauna? Can we assume
getuserbyemail
is returning a matching user in the Fauna example so it doesn't create a user?…