3

After switching to turbopack i have following error:

https://next-auth.js.org/errors#jwt_session_error crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported

Are there any solutions to this?

Nazar Duma
  • 127
  • 1
  • 1
  • 9

1 Answers1

1

Adding following code to app\api\auth\[...nextauth]\route.ts removed error.

import crypto from "node:crypto";
global.crypto ??= crypto;
Nazar Duma
  • 127
  • 1
  • 1
  • 9