Closed drfattytuna closed 1 year ago
Thanks for reporting this @drfattytuna 🙏 . I created an internal ticket to add support for crypto.hkdf
. We didn't add support for all the crypto APIs yet and hkdf
is one of them.
Hey 👋 We have added support for both hkdf
as well as aes-gcm
which fixes your example and allows you to use next-auth
. However, https://api.liveblocks.io is blocked by CORS which means the dashboard can't be loaded then. I suggest to ping them about this and maybe they can enable CORS for WebContainer. Let us know how that goes. Also, because next-auth
tries to redirect to localhost
after successfully signing in, which doesn't work because there is no server running on localhost
, you have to add a redirect
callback, e.g.
redirect({ url, baseUrl }) {
return url;
}
I am going to close the issue because the original issues with crypto have been fixed.
Describe the bug
Note: to repro you'll need to create a liveblocks account & add the secret keys, etc.
When I try to load this sample project then Sign In I get an error for an unsupported operation inside the node internal
hkdf
library, specifically when calling createSecretKey. It seems this is being triggered by the next-auth library.Here is the error:
Link to the blitz that caused the error
https://stackblitz.com/github/liveblocks/liveblocks/tree/main/starter-kits/nextjs-starter-kit
Steps to reproduce
Expected behavior
I would expect it to successfully sign in on the test app
Parity with Local
Screenshots
No response
Platform
Additional context
No response