Refactoring and Fixes#55
Merged
Merged
Conversation
Replaces the hardcoded Azure AD `upn` override with two new provider options `emailField` (default "email") and `emailVerified`. This prevents arbitrary providers from claiming identities via a `upn` claim and lets each provider decide which field carries the email and whether it is implicitly verified. Note: Azure AD configurations must now explicitly set `emailField: 'upn'` and `emailVerified: true`.
The strict `=== false` check previously let null/missing values through.
Prevents type juggling matches (e.g. when 0/true/null end up in the list) and aligns the email/domain whitelist with Kirby's case-insensitive user lookup.
Use explicit `??` assignments instead of `$$var` and rename `$email_verified` to `$emailVerified` for consistency.
Adds property, parameter and return types across Controller, Provider and ProvidersManager. Switches Session access from __call magic to typed `data()` calls and fixes an operator precedence bug in the empty-user-list check.
Replaces call_user_func_array with direct variable method calls and validates the provider class is an AbstractProvider before assignment.
Marks `error()` and `goToPanel()` as `: never` so PHPStan knows the
control flow terminates, and tightens the provider lookup and the
`get('error')` value handling against null/mixed types.
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.
No description provided.