Skip to content

Document company sign-ins reaching other memberships for company addresses - #292

Draft
tnkuehne wants to merge 2 commits into
mainfrom
company-sso-domain-access-docs
Draft

tnkuehne wants to merge 2 commits into
mainfrom
company-sso-domain-access-docs

Conversation

@tnkuehne

Copy link
Copy Markdown
Contributor

Documents #291 in the company sign-in and CLI authentication references: for addresses on the authenticating organization's verified domains, a company login also opens the person's other organizations, while organizations with their own required company sign-in ask for it.

Blocked on a published release that includes #291. Stays in draft until then.

A company SSO session or CLI token stayed limited to the organization that
authenticated it. People whose address is on that organization's verified
domain therefore lost their other organizations after a company sign-in.

That organization already controls the mailbox and could sign the person in
by email code, so the limit protects nothing for those addresses. Company
sign-ins now reach the person's other memberships when the address is on a
DNS-verified domain of the authenticating organization. Organizations that
require their own company SSO still require it. External guests and
recovery sessions keep the existing limit.

The domain proof is read on every use, so losing it limits existing sessions
and tokens again. The same rule covers organization access and listing, CLI
and app-login tokens, invitations, organization creation, plugin
management and account management. Company sign-ins still cannot change the
email address or link or unlink other providers.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs db7233e Nov 22 2026, 01:14 PM

tnkuehne added a commit that referenced this pull request Nov 22, 2026
)

A company SSO session or CLI token stays limited to the organization
that authenticated it. For people whose address is on that
organization's verified domain, this hides their other organizations
after a company sign-in, and the email field always routes them into
that company sign-in.

That organization already controls the mailbox and could sign the person
in by email code, so the limit protects nothing for those addresses.
Company sign-ins now reach the person's other memberships when their
verified address is on a DNS-verified domain of the authenticating
organization.

- Organizations that require their own company SSO still require it. The
organization list marks them, and opening one starts its sign-in.
- External guests, whose address is not on the authenticating
organization's domains, keep the existing limit. So do recovery
sessions, even for addresses on that domain.
- The proof is read on every use. Losing domain verification, or
removing the provider, limits existing sessions and tokens again.
- One rule, `companySignInLimit`, covers organization access and
listing, CLI and app-login tokens, invitations, organization creation,
plugin management and account management.
- For company addresses, account management (sessions, linked accounts,
name, deletion) works in a company sign-in. Changing the email address
and linking or unlinking other providers stay blocked, because the
organization keeps its addresses.
- After a company sign-in, people with several organizations land on the
organization chooser, as with email sign-in.

Validation
- `organization-sso.integration.test.ts`: the existing authority tests
now run against an external guest of both companies. A new test covers a
company address: reaching another membership, still requiring another
company's SSO, CLI tokens, invitations, organization creation, account
management, recovery staying limited, and losing domain verification
limiting the same session and token again.
- Full Vitest suite: 1242 passed. Browser suites `auth`, `onboarding`,
`oidc`, `organization-writes`, `self-hosted-sso` and `setup`: 84 passed.
Control-plane typecheck, format and type-aware lint are clean.
- Not run locally: the CLI-binary e2e suite, which CI runs.

Documentation: #292 (draft, waits for a release that includes this
change).

<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=115740888&amp;sig=83b9e524470e9031480cd7e041ebbc6de2e6e69af20b5b122e778432d3ab377b"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F291&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge; no
actionable issues were found.

<details open><summary><h3>Summary</h3></summary>

Company sign-ins can reach other memberships when the person's verified
email matches a DNS-verified domain of the authenticating organization.

- Verified company addresses can reach their other organization
memberships.
- Matching-domain company sessions can manage more account settings.
- Verified company addresses can read invitations and create
organizations.
- Verified company addresses can use allowed organization plugin
actions.

No actionable issues were found. This review used source inspection; no
tests were run.
</details>

<details open><summary><h3>Diagram</h3></summary>

```mermaid
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Sign-in or CLI token] --> B{Company authority?}
  B -- No --> C[Check membership and target SSO]
  B -- Yes --> D{Recovery?}
  D -- Yes --> E[Keep company limit]
  D -- No --> F{Verified email matches a verified company domain?}
  F -- No --> E
  F -- Yes --> C
  E --> C
  C --> G[Allow or require target company sign-in]
```
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (1) · Last reviewed commit: ["Let company sign-ins reach
other
members..."](935c15f)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
Base automatically changed from company-sso-domain-access to main November 22, 2026 13:42
@jonathanlaib jonathanlaib added the documentation Improvements or additions to documentation label Nov 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants