Morgbn / nuxt-csurf

Nuxt Cross-Site Request Forgery (CSRF) Prevention
https://nuxt-csurf.vercel.app
MIT License
81 stars 16 forks source link

encryptAlgorithm, aes-256-cbc by default node, AES-CBC serverless #15

Closed imcm7 closed 11 months ago

imcm7 commented 1 year ago

In docs encryptAlgorithm, aes-256-cbc by default node, AES-CBC serverless. But type check warn Type '"aes-256-cbc"' is not assignable to type '"AES-CBC"'.

johngerome commented 1 year ago

I'm also having the same problem. Any workaround ?

Morgbn commented 11 months ago

It seems that by default, typescript takes the web/serverless environment and not node. I don't know how to change that. But for information, if encryptAlgorithm is not set, the correct value will be set automatically depending on the runtime environment