atinux / nuxt-auth-utils

Add Authentication to Nuxt applications with secured & sealed cookies sessions.
MIT License
962 stars 90 forks source link

salt must be a Buffer #207

Closed michaelsieminski closed 1 month ago

michaelsieminski commented 1 month ago

Hey, after updating to the latest nuxt auth utils and implementing the new Password Hashing & Verifying I am receiving the error "salt must be a buffer" in Cloudflare.

atinux commented 1 month ago

What is your compatibility flags on Cloudflare @michaelsieminski

Make sure to set nodejs_compat and a compatibility date at least in October

michaelsieminski commented 1 month ago

What is your compatibility flags on Cloudflare @michaelsieminski

Make sure to set nodejs_compat and a compatibility date at least in October

I have the compatibility flag nodejs_compat already set and the date to Sep. 2024 (There is no oct. available for me to choose atm)

atinux commented 1 month ago

Try to set the compat flag to nodejs_compat_v2 then

michaelsieminski commented 1 month ago

Try to set the compat flag to nodejs_compat_v2 then

didn't seem to help :/

atinux commented 1 month ago

do you have a reproduction?

it works for me with https://github.com/atinux/nuxt-bcrypt-edge/blob/main/server/api/scrypt/hash.post.ts

Demo: https://bcrypt.nuxt.dev/scrypt

tahirmahmudzade commented 1 month ago

Try to set the compat flag to nodejs_compat_v2 then

i had the same issue but this completely solved the issue for me