wobsoriano / fastify-next-auth

Auth.js plugin for Fastify.
MIT License
49 stars 3 forks source link

Client fetch error: Request is not defined #1

Closed ghost closed 1 year ago

ghost commented 1 year ago

When following the Client API example in the README, I get the below error when running getProviders and getCsrfToken

Any ideas on how to fix it?

image

ghost commented 1 year ago

I was able to fix this by adding global.fetch = fetch. However, I still can't run the functions as I now get this error. Weirdly, I am able to use the NextAuth REST API to call the the /auth/csrf route manually though

image

wobsoriano commented 1 year ago

Can you try v0.1.7 and reopen it if the issue still persists? Thanks!