ERROR: Request is not defined when using Gatsby NextAuth.js
Environment
System: OS: Windows 10 10.0.19044 CPU: (4) x64 Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz Memory: 4.17 GB / 15.88 GB Binaries: Node: 16.15.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (106.0.1370.52) Internet Explorer: 11.0.19041.1566 npmPackages: next-auth: ^4.14.0 => 4.14.0 react: ^18.1.0 => 18.2.0
Reproduction URL
https://github.com/nextauthjs/next-auth/tree/main/apps/example-gatsby
Describe the issue
Error when executing function "~/next-auth-gatsby-example/src/api/[...nextauth].js":
Executed function "/api/[...nextauth]" in 82ms
ERROR
Request is not defined
How to reproduce
For some reasons this project does not work with gatsby on gatsby functions and/or netlify functions.
Expected behavior
This example project should work but does not
Will Gatsby still be supported in the near future? @balazsorban44