Repository navigation
app/: the OAuth server for MCP clients (sc-8900) - #57
Merged
Merged
Conversation
VisualCIdocspring/visualci · build #287 · 331 unchanged · no changes This PR vs base: 2 changed since #204, across 7 builds Updated as builds change. Agents can review with VisualCI's MCP tools. |
ndbroadbent
force-pushed
the
laravel-gitlab
branch
from
December 2, 2026 13:15
fba7d5a to
0489090
Compare
ndbroadbent
force-pushed
the
laravel-oauth
branch
from
December 2, 2026 13:15
857ffa2 to
a23b979
Compare
ndbroadbent
force-pushed
the
laravel-gitlab
branch
from
December 2, 2026 13:34
0489090 to
520180b
Compare
ndbroadbent
force-pushed
the
laravel-oauth
branch
2 times, most recently
from
December 2, 2026 14:00
26a11d0 to
2570a3a
Compare
This was referenced Dec 2, 2026
ndbroadbent
force-pushed
the
laravel-oauth
branch
from
December 2, 2026 14:26
2570a3a to
44deeb9
Compare
ndbroadbent
force-pushed
the
laravel-gitlab
branch
from
December 2, 2026 14:26
520180b to
0d3858c
Compare
…vel with our Users provider, the service name VisualCI, today's vca_/vcr_/vcs_ prefixes and the mcp scope; GET /login (the page Authenticate sends a signed-out person to, with GitHub and GitLab sign-in) and sign-in back to the page that sent them (url.intended); auth::oauth::Tokens for the MCP routes' guard
… are the MCP host's and the consent page the app host's /oauth/authorize, as today's server (OAUTH_ISSUER, OAUTH_AUTHORIZATION_ENDPOINT, from oauth-provider-laravel at DocSpring/oauth-provider-laravel-rs#1 until its release); production won't boot when they don't match the hosts; a token's subject (and the session's ID) is the person's pid, never their row ID; tested with all four hosts
…vider-laravel 0.1.1)
ndbroadbent
force-pushed
the
laravel-oauth
branch
from
December 2, 2026 15:04
4262ec2 to
d98a0e2
Compare
ndbroadbent
added a commit
that referenced
this pull request
Dec 2, 2026
…rgo couldn't read the manifest and main's app job failed)
ndbroadbent
added a commit
that referenced
this pull request
Dec 2, 2026
… (sc-8900) (#58) * Auth review follow-ups (sc-8900): /auth/session as today (name, avatar, the one organization) with CORS for the site's exact origin alone and no-store; /auth/providers lists the configured forges; tokens' last_used_at written at most once a minute; a project token stays a member of its own project (can review, as today), documented and tested * Sign-in, review fixes: the site's signed-in hint (vci_signed_in, plain and readable by its script, on the site's domain) is set at sign-in, renewed or cleared by /auth/session and cleared at logout, as today's; /auth/providers and /login offer a forge only when its OAuth application has its ID and its secret * Test: OAuth discovery expects the tests' APP_URL (https://app.visualci.test, since #59) * app/Cargo.toml: one tracing entry (#57's merge listed it twice, so cargo couldn't read the manifest and main's app job failed)
ndbroadbent
added a commit
that referenced
this pull request
Dec 2, 2026
… page request goes to /login since #57)
ndbroadbent
added a commit
that referenced
this pull request
Dec 2, 2026
) * app/: the person's own page (sc-8900): GET /api/ui/me (who they are, their organizations and roles, pending invitations, email choices, the heard-about question), email choices, an organization's billing email (admins), 'How did you hear about VisualCI?'; the team's email about each new sign-up through the outbox (reply-to the person), once answered or ten minutes after sign-up, every minute with a heartbeat (VISUALCI_SIGNUPS_HEARTBEAT) that fails when one waits over 40 minutes * Me, review fixes: /me says which forges people can sign in with (an OAuth application with its ID and secret), as today's; staff who aren't in an organization can't change its billing email; the sign-ups heartbeat fails when the database can't answer * Test: a signed-out /api/ui/me asks for JSON, as the React app does (a page request goes to /login since #57) * /me: each organization's usage (plan, credits this month, packs, reloads, the open source pool) from the domain's credits::usage, as today's (#71); the sc-8900 gate * Rebased on main: Cargo.lock resolved from main's, and the boot checks and dependencies merged
This was referenced Dec 3, 2026
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.
Stacked on #55. It wires oauth-provider-laravel for the MCP server, configured like today's server.
OAuthServiceProvideruses our ownUsersprovider. The service name is "VisualCI", and issued tokens are prefixedvca_(access),vcr_(refresh) andvcs_(client secrets), as today, distinct from personal (vcu_) and project (vci_) tokens.OAUTH_ISSUERandOAUTH_RESOURCESat deploy time: the app's URL and<mcp url>/mcp.GET /loginis the page the consent step'sAuthenticatesends a signed-out person to: one link each for GitHub and GitLab. After sign-in they come back to the consent page throughurl.intended.auth::oauth::Tokensis the guard for the MCP routes, for visualci features:.middleware(RequireToken::new()).middleware(Authenticate::via::<auth::oauth::Tokens>()).mcpscope only for now. Today'sadminscope must go to staff alone, and the package's consent step grants whatever a client asks for. It needs a consent hook in oauth-provider-laravel before the admin endpoint moves over.Test: the authorization server's metadata answers, and the consent page sends a signed-out person to
/login, which offers GitHub sign-in. All 17 app tests pass, and clippy is clean.