Skip to content

Document login client ID setting for OAuth invite flow#4940

Merged
shannonbradshaw merged 4 commits into
mainfrom
claude/oauth-login-client-id
May 1, 2026
Merged

Document login client ID setting for OAuth invite flow#4940
shannonbradshaw merged 4 commits into
mainfrom
claude/oauth-login-client-id

Conversation

@shannonbradshaw
Copy link
Copy Markdown
Collaborator

@shannonbradshaw shannonbradshaw commented Apr 16, 2026

Source changes

  • viamrobotics/app#11652 (APP-15958): Added a Login client ID field to the organization settings white-labeling page. The field designates which registered OAuth app is used for the login and invite flow.
  • Backend behavior change: previously, any registered OAuth app would be used automatically as the FusionAuth login client (the first one in the ClientIDs array). Now, LoginClientID must be set explicitly; otherwise invite links fall back to Viam's default login screen.
  • Invite flow branding: when a user opens an organization invite link, the organization's logo URL is now passed to the FusionAuth login screen as a logo_url query parameter.

Docs changes

  • docs/organization/oauth.md: Added a new ## Designate a login client ID section after "Set up auth app" covering:
    • The UI navigation path (organization dropdown → Settings and invites → White Labeling → Login client ID).
    • The validation rules (client ID must match a registered OAuth app; the app must include the invite redirect URI).
    • The effect on invite flow behavior (branded login screen with organization logo when set, Viam default login when empty).

How I found these

  • Xref lookup: no direct xref match for LoginClientID; the OAuth setup flow lives in docs/organization/oauth.md.
  • Grep matches: LoginClientID and login client ID found zero matches in docs; FusionAuth matched 4 files, only oauth.md is about OAuth setup.
  • Searched ClientIDs, client_ids, OAuthLoginClientID in docs (zero matches).
  • Verified the field label in app/ui/src/routes/(auth-required)/organization/[org_id]/settings/white-labeling.svelte reads Login client ID under the White Labeling heading.

Generated by daily docs change agent

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 16, 2026

Deploy Preview for viam-docs ready!

Name Link
🔨 Latest commit aae6561
🔍 Latest deploy log https://app.netlify.com/projects/viam-docs/deploys/69f4f344f5821e000951b44e
😎 Deploy Preview https://deploy-preview-4940--viam-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 34 (🔴 down 4 from production)
Accessibility: 99 (no change from production)
Best Practices: 83 (no change from production)
SEO: 92 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Base automatically changed from new-docs-site to main April 17, 2026 16:24
App PR viamrobotics/app#11652 added a Login client ID field to organization
settings that designates which OAuth app is used for the login and invite
flow. The previous behavior of automatically using the first registered
OAuth app was removed. Invite links now show the organization's logo on the
branded login screen.

Add a new "Designate a login client ID" section to the OAuth setup guide
covering the UI navigation, validation requirements, and the resulting
invite flow behavior.
@shannonbradshaw shannonbradshaw force-pushed the claude/oauth-login-client-id branch from 382f389 to d7e0a3a Compare April 20, 2026 09:20
Two corrections to the prior draft, both verified against the source
commit (app#11652, ccfeb836f).

The prior draft claimed that setting Login client ID causes invite
links to "pass your organization's logo URL to the login screen." That
is the wrong way around. Reading page/accept_invite.go after the
commit:

- LoginClientID set, GetCustomLoginURL succeeds: redirect to
  FusionAuth's /oauth2/authorize for the OAuth app. logo_url is NOT
  appended; the OAuth app's own branding (configured in FusionAuth)
  drives the screen.
- LoginClientID empty: redirect to Viam's default /login with
  addLogoURL appended.

So the org logo gets passed via logo_url on the DEFAULT-login path,
not the custom-login path. The actual user-visible feature in this
commit is that Viam's default invite-login screen now shows the org's
logo when one is uploaded.

The prior draft also missed the behavior change for orgs that already
had OAuth apps. The condition flipped from "any registered OAuth app
exists" to "LoginClientID is explicitly set," so orgs that previously
got a custom login screen automatically now fall back to Viam's
default until they set this field. Added a short callout.

Also softened the redirect-URI requirement: it is added automatically
on OAuth app creation (server_helper.go:591-593), so the prior phrasing
overstated how often a user might need to handle it manually.

Verified against:
- app/page/accept_invite.go (post-ccfeb836f)
- app/data/models.go GetCustomLoginURL, GetFusionAuthClientID
- app/data/data.go ThirdPartyConfigSetLoginClientID redirect-URI check
- app/domains/service/server_helper.go acceptInviteRedirectURI auto-append
- app/ui/src/routes/.../white-labeling.svelte for the field's hasOAuthApps
  gate and help-text
The prior draft (and my previous edit) carried "Settings and invites" as
a menu item. The actual menu item is "Settings." The string "Settings
and invites" appears only once in the entire app/ui/src tree, as inline
prose in fleet/.../members/section.svelte:45 referring to the same
destination — not as a label anywhere in navigation.

Re-verified every UI string on this section against the source:
- Org dropdown button text: the current org name (org-menu.svelte:71)
- Menu item: "Settings" linking to /organization/{id}/settings
  (org-menu.svelte:90)
- Page heading: "Settings" (settings/+page.svelte:40)
- Section heading: "White Labeling" (white-labeling.svelte:169)
- Field label: "Login client ID" (white-labeling.svelte:230)
- Help text under the field: "The OAuth app used for custom login and
  invite flows. Must be one of: ..." (white-labeling.svelte:246)
- Save button: "Save" (white-labeling.svelte:242)
- Conditional render: only when at least one OAuth app exists
  ({#if hasOAuthApps}, white-labeling.svelte:225)
@shannonbradshaw shannonbradshaw requested a review from gmulz April 30, 2026 14:28
@shannonbradshaw shannonbradshaw merged commit 72b18dc into main May 1, 2026
13 checks passed
@shannonbradshaw shannonbradshaw deleted the claude/oauth-login-client-id branch May 1, 2026 18:42
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🔎💬 Inkeep AI search and chat service is syncing content for source 'Viam Docs'

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.

2 participants