Skip to content

Fix OAuth sign-in for clients that append with a second ? - #6

Merged
wpgaurav merged 2 commits into
mainfrom
oauth-authorize-endpoint
Oct 8, 2026
Merged

wpgaurav merged 2 commits into
mainfrom
oauth-authorize-endpoint

Conversation

@wpgaurav

@wpgaurav wpgaurav commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Grok sent admin.php?page=site-agent-authorize?response_type=code&..., which wp-admin refuses as an unknown page ("Sorry, you are not allowed to access this page.").

  • The advertised authorization_endpoint is now /wp-json/site-agent/v1/oauth/authorize (no query string). It 302s to the consent screen with the request's parameters, Cache-Control: no-store. Without pretty permalinks the consent screen is still advertised directly.
  • admin_page_access_denied repairs page=site-agent-authorize?... into the proper consent URL, for clients holding the old metadata.
  • Tests cover both paths; an HTTP run on a disposable site reached the consent screen from both Grok-style URLs.
  • Version 0.4.2.

🤖 Generated with Claude Code

wpgaurav and others added 2 commits October 8, 2026 12:29
Clients such as Grok append their parameters with a second "?", so
admin.php?page=site-agent-authorize?response_type=... reached wp-admin
as an unknown page and was refused. The endpoint is now
/wp-json/site-agent/v1/oauth/authorize, which forwards to the consent
screen, and the consent address repairs such requests. Version 0.4.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wpgaurav
wpgaurav merged commit e06776a into main Oct 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant