The true reason of not using nonces for non logged in users, is that it adds a pointless burden on their usage as they need to refresh the page when the nonce expire, and the only way they will know that they need to do it is when something do not work.
There is probably no reason to avoid generating it, but if you expect that your “app” will be used/open for more then 12 hours (that is the “tick” time used to calculate wordpress nonces) then either you need to also have an automatic way to refresh the nonce (might be a good idea for logged in users as well) or avoid using it in the first place.
Related Posts:
- WP REST API: check if user is logged in
- Can’t GET draft posts via REST API from headless frontend
- Rest API: wp_verify_nonce() fails despite receiving correct nonce value
- Log in user using WordPress REST API
- wp_nonce vs jwt
- Register rest field authentication with REST API
- How to: Make JWT-authenticated requests to the WordPress API
- WordPress Rest API: How do we validate with our custom API key?
- WordPress REST API call generates nonce twice on every call
- How to Authenticate WP REST API with JWT Authentication using Fetch API
- authentication issue with rest api – rest_cannot_create
- Can I authenticate with both WooCommerce consumer key and JWT?
- How to login to WordPress site using basic authentication HTTP headers?
- Can we access the REST request parameters from within the permission_callback to enforce a 401 by returning false?
- WordPress REST API “rest_authentication_errors” doesn’t work external queries?
- Create Session with JWT
- Full page NGINX (or Cloudflare) caching and WordPress nonces
- WordPress REST API, Expired Nonce from Cache results in 403 forbidden
- Passing a borrowed nonce through Postman fails
- how to send Ajax request in wordpress backend
- permission_callback has no effect
- WP REST API GET Requests require authentication
- current_user_can(‘administrator’) returns false when I’m logged in
- Authenticating with REST API
- Make authorization mandatory on custom routes
- How to force JWT auth for default GET endpoints of WordPress rest api?
- REST API: best place to set current user for JWT auth?
- WordPress + REST API v2 and private pages Load by slug
- REST API authentication for a plugin
- PHP: authenticate for a REST request?
- Rest API basic auth not working
- Authenticate current user to REST API
- Getting 401 from ajax using an application password
- How to connect android app with WordPress website?
- WordPress REST API calls that depend on the WordPress User
- Backbone with custom rest endpoints
- WordPress HTTP API NTLM Authentication
- Advanced Access Manager: RESTful endpoint to refresh token
- Best Authetication between REST API and Mobile App
- How to verify which WordPress user requested the API in ASP .NET Core?
- Secure WordPress API, how?
- register/login api
- How can I secure my custom rest api endpoint or add under a already existing rest group
- REST API Integration without user account?
- WP REST API with Basic Auth at target website
- Cant POST with REST API on WordPress
- REST API – Authentication/Logon security
- Rest API nonce is being cached
- custom REST endpoints and application passwords
- wordpress rest api authentication failed
- How to add additional http header to a wp_error rest response
- Nonce validation in REST API
- Why is my custom API endpoint not working?
- Are there server performance benefits to fetching only specific fields when querying the REST API?
- How to define a query parameter with REST API?
- How do I correctly setup an AJAX nonce for WordPress REST API?
- How do I use the WP REST API plugin and the OAuth Server plugin to allow for registration and login?
- Hiding API routes list
- rest api authentication
- x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response
- How to get around WP REST API per page limit without pagination?
- How to properly add custom entities in Gutenberg
- REST API custom endpoint without authentication for POST method?
- CORS & Remote access to WP via RestAPI
- WP API ignores filter parameter
- WordPress doesn’t send a notification email when submitting a comment using REST API
- Using WordPress RESTapi to call a php file instead of post or page
- WordPress REST API – Modify JSON before importing
- pagination in WP rest api
- How to use REST API to send user metadata?
- Custom Rest API POST endpoint with conditionally required parameters
- What is the meta field in the response of the user REST API?
- Is there any way to clear cache when making REST API request?
- Custom API endpoint to create gallery for post
- Register REST route with a multi-value parameter
- How do I add meta when creating a post with rest api?
- Change permissions on REST api?
- WordPress REST API V2: how to get list of all posts?
- How to get data from /wp-json/wp/v2/users/me
- WordPress REST API parameters are not affecting a response
- Update meta_value in wp_postmeta using API
- WordPress plugin with CORS
- “Error: cURL error 60: SSL certificate problem: certificate has expired” when create product in WooCommerce via REST API
- How to use WordPress REST api to login a user?
- Need wp rest api for featured video post
- REST api header link href
- WordPress & React Native
- update meta data (like view counter) by rest-api
- How Can I keep password protected posts in the json requests but not on frontend queries?
- Update post / page using API + python
- Social login authentication via wordpress rest api
- WordPress json – How to use the content rendered from json
- Subscriber role cann’t add comment meta using REST API
- WordPress REST API function not calling from external site
- Issue with API after 6.2 update
- Verify user login and password over api
- All wp-json routes suddenly return 404
- Get rendered HTML single view from post template
- Modify request payload for Core API requests
- REST API not Posting Content in Draft Mode