fix(bootstrap-admin): target the app API, not the login profile's auth server#75
Merged
Conversation
…h server The bootstrap invite route and its delivery are exposed by the app API adapter, not the auth server. bootstrap-admin previously fell back to the active profile's instanceUrl, so once a profile pointed at the auth server (as login and admin commands require) bootstrap 404'd. Resolve the target independently: --api-url -> SEAMLESS_API_URL -> http://localhost:3000. Remove --profile from the command.
The auth server default (passkey,magic_link) has no method the CLI can drive without a browser authenticator, so seamless login could not sign in to a fresh scaffold. buildAuthEnv now appends email_otp to LOGIN_METHODS (composing with the oauth method when providers are configured).
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.
Problem
seamless bootstrap-adminandseamless loginneed different base URLs, and the CLI conflated them:/auth/internal/bootstrap/admin-inviteand its delivery are exposed by the app API (the SeamlessAuth server adapter), which proxies/auth→ the auth server's/internal/.... The auth server does not serve/auth/internal/...(it 404s).loginand every admin command (whoami,sessions,config,users,org) hit the profile'sinstanceUrldirectly, and those routes (/login,/otp/*,/admin/*,/sessions,/system-config/*) live on the auth server.bootstrap-adminresolved its target asSEAMLESS_API_URL → profile.instanceUrl → localhost:3000. So once you set the auth-server profile thatloginrequires,bootstrap-adminfell through to it and every invite request 404'd.Fix
Resolve
bootstrap-admin's target independently of any login profile — it's inherently the app API adapter:--api-url <url>.--profilefrom this command (it no longer affects the target; the bootstrap secret is still auto-resolved from the local project —.env,auth/.env,docker-compose.yml).This is safe because
bootstrap-adminis a local-stack tool (it authenticates with the sharedSEAMLESS_BOOTSTRAP_SECRET; managed instances bootstrap via the portal), so the auth-server-profile fallback only ever broke the local case.Testing
tsc,eslint,buildclean; 588 vitest tests pass (bootstrapAdmin.tsat 100% coverage). The API-URL-resolution suite now covers--api-url,SEAMLESS_API_URL, the default, and precedence.Independent of the console-hosting PR (#74); branches off
main.