Repository navigation
fix(auth): admit by email address only when the email is verified - #818
Merged
Merged
Conversation
An invitation matched by address and an organization's email-domain auto-join pattern now admit a user only when their email is verified (email_verified_at set). This applies to every sign-in path that runs these rules: a sign-in from an organization's login page, the org-less sign-in that settles a user into an organization, and the cross-org auto-join. An email change clears the verification, so a changed address no longer admits anyone until it is verified. Accepting an invitation through its link is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #818 +/- ##
==========================================
- Coverage 89.24% 89.21% -0.03%
==========================================
Files 1332 1332
Lines 135956 135967 +11
==========================================
- Hits 121334 121307 -27
- Misses 14613 14651 +38
Partials 9 9
🚀 New features to boost your workflow:
|
fclairamb
enabled auto-merge (squash)
November 9, 2026 08:06
Merged
fclairamb
added a commit
that referenced
this pull request
Nov 9, 2026
🤖 I have created a release *beep* *boop* --- ## [0.45.0](v0.44.3...v0.45.0) (2026-11-09) ### Features * dashboard glance strips, failed sign-in account names, log noise fixes ([#824](#824)) ([659c52c](659c52c)) * **dashboard:** 24h / 7d / 30d availability window, saved per user ([#821](#821)) ([283a28e](283a28e)) * **mcp:** sharpen tool descriptions for Glama scoring ([#825](#825)) ([ca305f1](ca305f1)) * **server:** run as a native Linux systemd service ([#819](#819)) ([8a0cb2f](8a0cb2f)) * **server:** run as a native macOS launchd service ([#811](#811)) ([c6612ea](c6612ea)) * **server:** run as a native Windows service, no NSSM ([#802](#802)) ([c66c947](c66c947)) * **telegram:** explicit /support mode instead of capturing every message ([#820](#820)) ([571607e](571607e)) ### Bug Fixes * **auth:** admit by email address only when the email is verified ([#818](#818)) ([91992fe](91992fe)) * batch of production-log and Slack issues ([#808](#808)) ([580d09c](580d09c)) * **deps:** update github.com/dop251/goja digest to d6eaa50 ([#800](#800)) ([60b7443](60b7443)) * **deps:** update github.com/dop251/goja digest to d8dfb4d ([#810](#810)) ([e11b926](e11b926)) * **deps:** update go dependencies (non-major) ([#806](#806)) ([1c59927](1c59927)) * **deps:** update go dependencies (non-major) ([#822](#822)) ([ec0aebf](ec0aebf)) * **deps:** update module github.com/aws/aws-sdk-go-v2/credentials to v1.20.17 ([#823](#823)) ([27efc51](27efc51)) * **deps:** update module github.com/crewjam/saml to v0.6.3 ([#807](#807)) ([0f06336](0f06336)) * **deps:** update module github.com/wneessen/go-mail to v0.8.2 ([#812](#812)) ([3670206](3670206)) * **oncall:** record on-call override changes in the audit log ([#816](#816)) ([4561f41](4561f41)) * serve robots.txt, indexable on solidping.io only ([#809](#809)) ([3512833](3512833)) * **server:** refuse a pre-existing Windows service data folder others control ([#817](#817)) ([b1832b5](b1832b5)) * **vendorstatus:** drop datadog and atlassian from the catalog ([#814](#814)) ([d3397c5](d3397c5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Summary
Email-based organization admission now requires a verified email (
users.email_verified_atset):JoinOrgViaLoginrule 3, andjoinPendingInvitationin the org-less sign-in path);registration.email_patternauto-join (JoinOrgViaLoginrule 5, andautoJoinMatchingOrgs, which now takes the user instead of a UID and email).Before this, those rules trusted
users.emailas proven, but a self-service email change sets the new address immediately and only clearsemail_verified_at, which nothing read. Now a changed address admits nobody until it is verified. Accepting an invitation through its link is unchanged: the token is the proof.Sign-up confirmation, invitation sign-up and the identity providers that vouch for the address already set
email_verified_at, so normal sign-ups keep their behaviour.Tests
email_admission_test.go:TestEmailAdmissionRequiresVerifiedEmail: table over every email-based admission path (login on the org with an invitation or a pattern, org-less sign-in with an invitation or a pattern, cross-org auto-join). Each path runs verified (positive control: admitted, invitation consumed) and unverified (not admitted, invitation kept).TestChangedEmailAdmitsNobodyUntilVerified: end to end throughPATCH /auth/me, then a federated sign-in. Nothing admits the user; once the address is verified, the same sign-in admits them.models.NewUserand expected email-based admission now use verified accounts (newVerifiedUser), as a real sign-up would.TestAutoJoinMatchingOrgsSkipsBadStoredPatternuses a verified user so it still exercises the bad-pattern guard.Docs
web/docs/docs/configuration/authentication.md: the sign-up and email-change sections now say that invitations and email patterns need a verified email.Verification
go build ./...,go vet ./...go test -short ./internal/handlers/... ./internal/integrations/... ./pkg/cli/ ./test/integration/...: passgolangci-lint run ./...: 0 issuesAdvisory: GHSA-whpj-cqmv-p38g
🤖 Generated with Claude Code