UNPKG
nuxt-csurf
Version:
beta (1.3.0-beta.1)
latest (1.6.5)
1.6.5
1.6.4
1.6.3
1.6.2
1.6.1
1.6.0
1.5.2
1.5.1
1.5.0
1.4.2
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.3.0-beta.1
1.2.0
1.1.0
1.0.1
1.0.0
Nuxt Cross-Site Request Forgery (CSRF) Prevention
github.com/Morgbn/nuxt-csurf
Morgbn/nuxt-csurf
nuxt-csurf
/
dist
/
runtime
/
server
/
helpers.js
4 lines
(3 loc)
•
220 B
JavaScript
View Raw
1
2
3
4
import
{ importEncryptSecret }
from
"uncsrf"
;
let
secretKey;
export
const
useSecretKey
=
async
(
options
) => secretKey ? secretKey : secretKey =
await
importEncryptSecret
(options.
encryptSecret
, options.
encryptAlgorithm
);