[wp-trac] [WordPress Trac] #37569: REST API: refresh expired nonces
WordPress Trac
noreply at wordpress.org
Thu Jan 12 04:34:24 UTC 2017
#37569: REST API: refresh expired nonces
-----------------------------------------------+---------------------------
Reporter: iseulde | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: REST API | Review
Severity: normal | Version: 4.4
Keywords: needs-docs dev-feedback has-patch | Resolution:
| Focuses:
-----------------------------------------------+---------------------------
Changes (by rmccue):
* keywords: needs-patch needs-docs dev-feedback => needs-docs dev-feedback
has-patch
Comment:
We can refresh the nonce via Heartbeat, similar to the existing code that
does the same for the regular nonces in the admin. [attachment:37569.diff]
adds a new `wp-api-nonce` script that does just that. It only refreshes
the nonce in the second tick (12-24 hours).
This is a separate script to avoid creating a dependency on `heartbeat`
for `wp-api`, as you may not want Heartbeat loading constantly on the
frontend of your site.
@iseulde Does this suit your use case?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37569#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list