René's URL Explorer Experiment


Title: Self-hosted multi-user OAuth Problem in 1.35.1: client requests /api/auth/* but server mounts NextAuth at /v1/auth/* · Issue #362 · onecli/onecli · GitHub

Open Graph Title: Self-hosted multi-user OAuth Problem in 1.35.1: client requests /api/auth/* but server mounts NextAuth at /v1/auth/* · Issue #362 · onecli/onecli

X Title: Self-hosted multi-user OAuth Problem in 1.35.1: client requests /api/auth/* but server mounts NextAuth at /v1/auth/* · Issue #362 · onecli/onecli

Description: Summary After enabling Google OAuth multi-user mode on a self-hosted gateway, the dashboard fails to sign in because the client-side React code requests /api/auth/providers while the server-side NextAuth handler is mounted at /v1/auth/*....

Open Graph Description: Summary After enabling Google OAuth multi-user mode on a self-hosted gateway, the dashboard fails to sign in because the client-side React code requests /api/auth/providers while the server-side Ne...

X Description: Summary After enabling Google OAuth multi-user mode on a self-hosted gateway, the dashboard fails to sign in because the client-side React code requests /api/auth/providers while the server-side Ne...

Opengraph URL: https://github.com/onecli/onecli/issues/362

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Self-hosted multi-user OAuth Problem in 1.35.1: client requests /api/auth/* but server mounts NextAuth at /v1/auth/*","articleBody":"## Summary\n  \n  After enabling Google OAuth multi-user mode on a self-hosted gateway, the dashboard fails to sign in because the client-side React code requests `/api/auth/providers` while the server-side NextAuth handler\n  is mounted at `/v1/auth/*`. Result: 404, redirect to `/api/auth/error` (also 404), no path to a working multi-user install. This blocks Projects, blocks the multi-account feature shipped in #187 (only\n  exposed via the org API), and effectively makes self-hosted multi-user mode unusable in 1.35.1.\n  \n  ## Environment\n  \n  - Gateway image: `ghcr.io/onecli/onecli:1.35.1` (digest `sha256:7339d4490…`)\n  - CLI: `onecli` 2.2.4 (macOS arm64)\n  - Host: macOS 14, Docker 29.3.1\n  - Mode: self-hosted, transitioning from single-user → multi-user\n  - Postgres: bundled `postgres:18-alpine`\n  \n  ## Reproduction \n  \n  1. Fresh self-hosted gateway running on `127.0.0.1:10254` with the default `docker-compose.yml`, no `.env`.\n  2. In Google Cloud Console: create OAuth 2.0 Client (Web application) with authorized redirect URIs:\n     - `http://localhost:10254/v1/auth/callback/google`\n     - `http://127.0.0.1:10254/v1/auth/callback/google`\n  3. Create `~/.onecli/.env`:\n     ``` \n     ONECLI_VERSION=1.35.1\n     NEXTAUTH_SECRET=\u003copenssl rand -base64 32\u003e\n     ``` \n  4. Create `~/.onecli/docker-compose.override.yml` to inject the Google vars (the bundled compose only maps `NEXTAUTH_SECRET` in its `environment:` block, not `GOOGLE_*`, so this override is also required —\n  see \"Secondary issue\" below):\n     ```yaml\n     services:\n       onecli:\n         environment:\n           GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}\n           GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}\n     ```\n  5. Add `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` to `~/.onecli/.env`.\n  6. `docker compose up -d`. Container becomes healthy.\n  7. Open `http://localhost:10254/auth/login` in a fresh Chrome incognito window. Click the Google sign-in button.\n  \n  ## Observed\n  \n  ```\n  GET http://localhost:10254/api/auth/providers\n  → 404 Not Found\n    {\"error\":{\"message\":\"Unrecognized request URL (GET: /v1/auth/providers). ...\",\"type\":\"invalid_request_error\"}}\n  \n  GET http://localhost:10254/api/auth/error\n  → 404 Not Found\n    (same gateway \"Unrecognized request URL\" body)\n  ```\n  \n  Browser address bar lands at `http://localhost:10254/api/auth/error` with no `?error=…` query string (because NextAuth never got far enough to attach one — the providers fetch failed first).\n  \n  Meanwhile, the same endpoints under `/v1/auth/*` work correctly server-side:\n  \n  ```\n  GET http://localhost:10254/v1/auth/providers  → 200\n  {\"google\":{\"id\":\"google\",\"name\":\"Google\",\"type\":\"oidc\",\"signinUrl\":\"http://localhost:10254/v1/auth/signin/google\",\"callbackUrl\":\"http://localhost:10254/v1/auth/callback/google\"}}\n  GET http://localhost:10254/v1/auth/csrf       → 200 {\"csrfToken\":\"...\"}\n  GET http://localhost:10254/v1/auth/session    → 200 (returns {} or session)\n  ```\n  \n  The Next.js routes-manifest inside the container confirms only `/v1/auth/[...nextauth]/route` and `/v1/auth/session/route` are registered — there are no `/api/auth/*` routes.\n  \n  ## What I tried that didn't help\n  \n  Setting these in the container env (via the override compose) made the SERVER side report the right URLs (the `signinUrl`/`callbackUrl` in `/v1/auth/providers` updated to the `/v1/auth/...` form), but the\n  CLIENT side still requested `/api/auth/providers`:\n  \n  - `NEXTAUTH_URL=http://localhost:10254/v1/auth`\n  - `AUTH_URL=http://localhost:10254/v1/auth`\n  - `AUTH_TRUST_HOST=true`\n  \n  Grepping the built client chunks under `/app/apps/web/.next/static/chunks`:\n  - No `SessionProvider` `basePath` prop assignment found\n  - No `NEXT_PUBLIC_*` env var for auth basePath defined or referenced\n  - Only `NEXT_PUBLIC_APP_URL` and three `NEXT_PUBLIC_COGNITO_*` vars exist on the public side\n  - The only hardcoded auth path in the built code is `/v1/auth/session` (one occurrence); everything else NextAuth-related is constructed at runtime by the library default\n\n## Impact\n  \n  - Self-hosted multi-user OAuth is fully blocked in 1.35.1\n  - Projects feature inaccessible (gated on multi-user)\n  - Multi-account connections (#180 / #187) are gated on the org API which itself is gated on multi-user\n  - The 1.35.1 release note \"restore default project fallback for self-hosted auth\" suggests this area is being actively maintained — this issue is likely a close cousin\n","author":{"url":"https://github.com/dj42spfmvb-eng","@type":"Person","name":"dj42spfmvb-eng"},"datePublished":"2026-06-10T05:00:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/362/onecli/issues/362"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8880745b-52ad-15bd-c465-0b99b5b73363
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8876:29748D:3AD4B10:501AFBE:6A5DEE1E
html-safe-nonce563b853fc625093bd080f1573142e9261516531ee091af2efd27c2980eba2d7c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODc2OjI5NzQ4RDozQUQ0QjEwOjUwMUFGQkU6NkE1REVFMUUiLCJ2aXNpdG9yX2lkIjoiNTA0NzMwOTUwMzQ3OTgwMzQyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac184215f498d6035a2e3d07c5635fb69f0b91c27bc58956428b7c9bee554bae0b
hovercard-subject-tagissue:4628157832
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/onecli/onecli/362/issue_layout
twitter:imagehttps://opengraph.githubassets.com/365fca462d73c7a26c0a7b4a8b04ac539d6be6f159d5503533098a75d90ec88a/onecli/onecli/issues/362
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/365fca462d73c7a26c0a7b4a8b04ac539d6be6f159d5503533098a75d90ec88a/onecli/onecli/issues/362
og:image:altSummary After enabling Google OAuth multi-user mode on a self-hosted gateway, the dashboard fails to sign in because the client-side React code requests /api/auth/providers while the server-side Ne...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedj42spfmvb-eng
hostnamegithub.com
expected-hostnamegithub.com
None8e8f322dc74b1a8d5bafb296008dbb96bb4a0bc6ee2d6f30844ab111697c520d
turbo-cache-controlno-preview
go-importgithub.com/onecli/onecli git https://github.com/onecli/onecli.git
octolytics-dimension-user_id263660444
octolytics-dimension-user_loginonecli
octolytics-dimension-repository_id1175900220
octolytics-dimension-repository_nwoonecli/onecli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1175900220
octolytics-dimension-repository_network_root_nwoonecli/onecli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7ae00b343090b49d0d18b8184187f51a39ed917c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/onecli/onecli/issues/362#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fonecli%2Fonecli%2Fissues%2F362
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fonecli%2Fonecli%2Fissues%2F362
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=onecli%2Fonecli
Reloadhttps://github.com/onecli/onecli/issues/362
Reloadhttps://github.com/onecli/onecli/issues/362
Reloadhttps://github.com/onecli/onecli/issues/362
Please reload this pagehttps://github.com/onecli/onecli/issues/362
onecli https://github.com/onecli
oneclihttps://github.com/onecli/onecli
Notifications https://github.com/login?return_to=%2Fonecli%2Fonecli
Fork 144 https://github.com/login?return_to=%2Fonecli%2Fonecli
Star 2.5k https://github.com/login?return_to=%2Fonecli%2Fonecli
Code https://github.com/onecli/onecli
Issues 65 https://github.com/onecli/onecli/issues
Pull requests 25 https://github.com/onecli/onecli/pulls
Actions https://github.com/onecli/onecli/actions
Projects https://github.com/onecli/onecli/projects
Security and quality 0 https://github.com/onecli/onecli/security
Insights https://github.com/onecli/onecli/pulse
Code https://github.com/onecli/onecli
Issues https://github.com/onecli/onecli/issues
Pull requests https://github.com/onecli/onecli/pulls
Actions https://github.com/onecli/onecli/actions
Projects https://github.com/onecli/onecli/projects
Security and quality https://github.com/onecli/onecli/security
Insights https://github.com/onecli/onecli/pulse
#406https://github.com/onecli/onecli/pull/406
#380https://github.com/onecli/onecli/pull/380
Self-hosted multi-user OAuth Problem in 1.35.1: client requests /api/auth/* but server mounts NextAuth at /v1/auth/*https://github.com/onecli/onecli/issues/362#top
#406https://github.com/onecli/onecli/pull/406
#380https://github.com/onecli/onecli/pull/380
https://github.com/dj42spfmvb-eng
dj42spfmvb-enghttps://github.com/dj42spfmvb-eng
on Jun 10, 2026https://github.com/onecli/onecli/issues/362#issue-4628157832
#187https://github.com/onecli/onecli/pull/187
Support multi-account OAuth connections for Google services #180https://github.com/onecli/onecli/issues/180
feat: multi-account connections, credential_not_found and access_restricted #187https://github.com/onecli/onecli/pull/187
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.