This repository was archived by the owner on Oct 28, 2026. It is now read-only.
Repository navigation
Trust the provider: no verified-email requirement, no TOTP for linked accounts #33
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
39 changes: 39 additions & 0 deletions
39
database/migrations/2026_07_31_090000_drop_trust_provider_email_from_oidc_settings.php
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| use Illuminate\Database\Migrations\Migration; | ||
| use Illuminate\Database\Schema\Blueprint; | ||
| use Illuminate\Support\Facades\Schema; | ||
|
|
||
| /** | ||
| * Drops the `email_verified` trust setting, because the console no longer asks | ||
| * the question it answered. | ||
| * | ||
| * Linking an existing account used to require the provider to vouch for the | ||
| * address, on the reasoning that an IdP letting someone type an arbitrary email | ||
| * into a profile page would be a way to walk into somebody else's account. That | ||
| * threat needs an IdP that hands out accounts to strangers. The provider this is | ||
| * built for is internal and gates access to this application behind manual | ||
| * approval, so the address it states is as trustworthy as the identity it states | ||
| * — and treating one as gospel while interrogating the other was incoherent. | ||
| * | ||
| * `email_verified` is still read: it is what decides whether the local | ||
| * `email_verified_at` is set. It just no longer decides who may sign in. | ||
| */ | ||
| return new class extends Migration | ||
| { | ||
| public function up(): void | ||
| { | ||
| Schema::table('oidc_settings', function (Blueprint $table) { | ||
| $table->dropColumn('trust_provider_email'); | ||
| }); | ||
| } | ||
|
|
||
| public function down(): void | ||
| { | ||
| Schema::table('oidc_settings', function (Blueprint $table) { | ||
| $table->boolean('trust_provider_email')->default(true)->after('groups_claim'); | ||
| }); | ||
| } | ||
| }; |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Clear verification state after an unverified email change.
When
$emailIsFreeis true and$identity->emailVerifiedis false, this path replaces$user->emailbut leaves a prioremail_verified_atvalue unchanged. The new address is then recorded as verified even though the provider did not verify it. Clear the timestamp when this path changes the email to an unverified address.Proposed fix
if ($emailIsFree) { $user->email = $identity->email; + if (! $identity->emailVerified) { + $user->email_verified_at = null; + } }🤖 Prompt for AI Agents