Magic-link login for hosting panels (TigerWHM Admin button) — 1.8.0 - #270
Merged
Merged
Conversation
….8.0) A one-time, 2-minute, single-use sign-in URL on the existing auth_challenge substrate (type magic_link; only the token hash stored; one live link per user; attempt-limited), redeemed into a session and audited like any login. Minted only by something that owns the install — the headless installer's login verb, a hosting panel's Log in button — never by a web request. Tests: service (sign-in + audit, replay, wrong token, malformed id, superseded, expired, inactive user) and controller (/auth/magic lands an admin in /admin; a bad link goes to /auth/login). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L8p9pLJ3DFstG3xZuh2QgZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tiger_Service_Authentication::issueMagicLink($userId)→/auth/magic/id/<challenge>/t/<token>(2-min TTL, single-use, hash-only storage, one live link per user) andredeemMagicLink()→ session + login audit.AuthController::magicAction— success lands in the role home (/admin), anything else goes to/auth/login.loginverb / TigerWHM's Admin button), never by a web request. This is WP Toolkit's "Log in" for Tiger.Test plan
AuthenticationTest: +2 (sign-in + audit + replay; wrong token / malformed id / superseded / expired / inactive).CoreControllerDispatchTest: +1 (redirects both ways, identity established).🤖 Generated with Claude Code
https://claude.ai/code/session_01L8p9pLJ3DFstG3xZuh2QgZ