-
-
Notifications
You must be signed in to change notification settings - Fork 975
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
check for duplicate email address on enrollment? #12495
Comments
There is with expression policys and some Python. |
Excellent. Is there an example or skeleton that shows how to do it? |
It's a bit of trial and error. This might also help: https://github.com/pikaviestin/documentation/blob/main/email_validation_policy.py |
We are using this expression policy to check for duplicate emails: from authentik.core.models import User
email = request.context["prompt_data"]["email"]
if User.objects.filter(email__iexact=email).exists():
ak_message("This email address is already in use.")
return False
return True |
Thank you very much. All of it is very helpful. |
Describe your question/
On an enrollment it is possible to check if the user given mail address is already in use by another account
(in stage default-source-enrollment-prompt or in default-source-enrollment-write) ?
Applications like DokuWiki get confused when there are multiple accounts with the same mail address?
Basically I want to enforce that all accounts have an unique mail address.
Version and Deployment (please complete the following information):
The text was updated successfully, but these errors were encountered: