MCPcopy Create free account
hub / github.com/decaporg/decap-cms / validateNonce

Function validateNonce

packages/decap-cms-lib-auth/src/utils.js:7–12  ·  view source on GitHub ↗
(check)

Source from the content-addressed store, hash-verified

5}
6
7export function validateNonce(check) {
8 const auth = window.sessionStorage.getItem('decap-cms-auth');
9 const valid = auth && JSON.parse(auth).nonce;
10 window.sessionStorage.removeItem('decap-cms-auth');
11 return check === valid;
12}
13
14export function isInsecureProtocol() {
15 return (

Callers 3

completeAuthMethod · 0.90
completeAuthMethod · 0.90
utils.spec.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected