-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Security] Update custom authenticator docs to include identifier normalization #20636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 7.3
Are you sure you want to change the base?
Conversation
Improve the documentation for custom authenticators by detailing the concept of user identifier normalization. Introduced the `NormalizedUserBadge` example to demonstrate how to simplify and standardize identifiers. Clarified how normalization avoids duplicates and ensures consistent user recognition.
b58b83b
to
a7df8a2
Compare
You can optionally pass a user identifier normalizer as third argument to the | ||
``UserBadge``. This callable receives the ``$userIdentifier`` | ||
and must return a normalized user identifier as a string. | ||
|
||
.. versionadded:: 7.3 |
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.
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.
Many thanks.
I will take time to update this section.
.. note:: | ||
|
||
Similarly, Google normalizes email addresses so that "john.doe", "j.hon.d.oe", | ||
and "johndoe" all correspond to the same account. | ||
This involves removing dots and converting the email address to lowercase | ||
(though normalization specifics depend on your use case). |
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.
With the other note below, I'm not sure this one is needed
Fixes #20632
Improve the documentation for custom authenticators by detailing the concept of user identifier normalization. Introduced the
NormalizedUserBadge
example to demonstrate how to simplify and standardize identifiers.