I have created a form that have nonce
I have a WordPress site with WooCommerce. I would like to add a Logout option to the Menu that logs out the user without asking for confirmation.
On the fronted the
wp_localize_script seems to be working as when I view the source I can see the nonce.
When using a nonce in a Content Security Policy header, both Google Chrome and Firefox return errors. The nonce value is for a style element i.e.
<style id="some-id">// CSS </style>
I’m having trouble validating a nonce created with
wp_create_nonce() inside a hidden input with the name nonce in an html form:
We’ve got a small web application that allows users to log in (via WordPress) and remain logged in for a max 15 min session for security purposes. Because most sessions will last longer, I have a small ajax call that’s made on each click of the html document itself.
I am aware of the fact that we can alter nonce life time using filter , 30 seconds here: