• Resolved alexcz

    (@alexcz)


    “OAuth authorization fails, refs ofid_61e0fb012cd79698 and ofid_5f2c01dedde05b13, site on Hostinger with LiteSpeed + hcdn CDN and Wordfence; Live Traffic shows no block of the endpoint.”

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support rpteam

    (@rpteam)

    Hi @alexcz ,

    Thanks for the report. Quick note first: the ofid_* codes are Anthropic-side reference IDs (Claude’s OAuth backend generates them to trace failures on their side), so they don’t decode to a specific error on our end. Two different ofid_ codes across two attempts usually means the request is failing at a different step each time.

    On a Hostinger + LiteSpeed + hcdn + Wordfence stack there are four layers a request can be dropped at before Royal MCP ever sees it, so the fastest path is to narrow down which layer. Three quick checks (each under 2 minutes) and will tell us where to look:

    1) ACTIVITY LOG CHECK (most important, 30 seconds)

    In wp-admin go to Royal MCP → Activity Log. Reproduce the failing connection attempt in Claude, then refresh the log page.

    – If you see rows with action starting oauth: in the last few minutes (even ERROR rows) → the request reached WordPress and we can debug from what the plugin logged.

    – If the log stays empty after a reproduced failure → the request never reached PHP. Hostinger’s hcdn CDN, LiteSpeed, or Wordfence dropped it upstream.

    Wordfence Live Traffic won’t show a block from hcdn or LiteSpeed — Wordfence only records what makes it to PHP. So “no block in Live Traffic” is fully consistent with hcdn or LiteSpeed silently dropping the request upstream.

    2) OUTSIDE-IN CURL PROBE (2 minutes)

    Our start-here doc has a 30-second probe that shows whether your edge is interfering with OAuth discovery:

    https://royalplugins.com/support/royal-mcp/troubleshooting-start-here.html

    Run the two curl lines from “Step 0” from your own machine (not from the WordPress server) and paste the output back. That will tell us if hcdn is serving a challenge page, stripping headers, or caching the OAuth endpoints.

    3) CONTEXT

    – Which client are you connecting from — Claude.ai web, Claude Desktop, something else?
    – Does the WordPress OAuth consent screen render at all, or does it fail before you get there?
    – If consent renders and you click Approve — does the browser bounce back to the client and then show the error, or does it fail during the bounce?

    “Consent completes, then ofid_ appears” points at the token-exchange step, which Anthropic’s backend performs server-to-server against your site. That step is the most sensitive to host-layer IP blocks or WAF rules on POST bodies — if that’s your pattern, the fix is usually a specific ask to Hostinger support.

    While you’re at it, one thing to try that costs nothing: open Royal MCP → Settings and click Reset OAuth State. That wipes any stale records from a half-completed flow. Won’t fix an upstream block, but it rules out corrupted state as a variable.

    Post back the Activity Log result + the two curl outputs and we’ll narrow it in the next reply.

    RP Team

    • This reply was modified 1 week, 2 days ago by rpteam. Reason: bad formatting
    Thread Starter alexcz

    (@alexcz)

    Reply from Claude….

    Following your steps, I checked Royal MCP → Activity Log first. It was not empty — the failing attempt was logged, which immediately told us the request was reaching WordPress and this wasn’t an upstream edge block after all. The most recent failing row was:

    • Action: oauth:token
    • Request: POST /token, from python-httpx/0.28.1 (IP 160.79.106.34), grant_type: refresh_token
    • Response: 400 invalid_grant — "Refresh token is invalid, expired, or revoked."

    So Anthropic’s backend was reaching my /token endpoint fine, and Royal MCP was correctly rejecting a stale refresh token. It clicked into place when I noticed two oauth:reset SUCCESS rows just before that failure — I’d clicked Reset OAuth State earlier, which wiped the server-side record, but Claude was still holding (and retrying) the old refresh token.

    Fix: I deleted the connector on the Claude side entirely and re-added it from scratch, running a fresh authorization-code flow. It reconnected immediately. Your royal_mcp_connection_health tool now reports a fresh oauth-bearer token (~59 min TTL), active session, scope tools, on Royal MCP 1.4.38 / WP 7.0.2 / PHP 8.3.30.

    Me: Thanks very much for super quick reply and detailed info. Alex

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.