Jake Vanderwerf
2026-06-29 4089ba01e0881c89a72332e13bc3a80b6bddec2a
assets/js/concise/AuthManager.js
@@ -50,6 +50,7 @@
      }
   }
   /**
    * Refresh nonce if authentication fails
    */
@@ -77,11 +78,22 @@
            'X-WP-Nonce': this.getNonce()
         };
         const response = await fetch(url, {
         if (!isFormData && typeof options.body === 'object' && !Object.hasOwn(options.body, 'user')) {
            options.body.user = this.getUser();
         }
         let obj = {
            ...options,
            credentials: 'same-origin',
            headers
         });
         };
         if (!isFormData && typeof obj.body === 'object') {
            obj.body = JSON.stringify(obj.body);
         }
         const response = await fetch(url, obj);
         if ((response.status === 403 || response.status === 401) && retryCount === 0) {
            const result = await response.clone().json();
@@ -127,6 +139,7 @@
      this.authenticated = authData.authenticated || false;
      this.user = authData.user || false;
      this.nonces = authData.nonces || {};
      console.log(this.nonces);
      // Session expired — was logged in, now isn't
      if (wasAuthenticated && !this.authenticated) {