Skip to content
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

Remove contact_info completely from the email validation process #6567

Closed
4 of 7 tasks
nicholaspcr opened this issue Sep 18, 2023 · 0 comments
Closed
4 of 7 tasks

Remove contact_info completely from the email validation process #6567

nicholaspcr opened this issue Sep 18, 2023 · 0 comments
Assignees
Labels
c/identity server This is related to the Identity Server compat/db This could affect Database compatibility in progress We're working on it
Milestone

Comments

@nicholaspcr
Copy link
Contributor

Summary

References #4930
Should be done before #6515

The contact_info field was been deprecated from the API but it is still attached to some of the business logic, in particular it is strongly linked to the email validation process.

We should decouple the contact_info field from the process of validating an email. this can be done by making a new table for email_validations and moving the logic of the validations outside of the usage of contact_info, this is easier to do after removing the values of entities which had their contact_info migrated or that have the field as read-only in the user table.

Current Situation

Whenever an User is created, its primary_email_address is converted to an contact_info, that means that the value is stored in both the primary_email_address column of an user's table and as a row on the contact_infos table.

The email validations interact purely with the contact_info_validations table, making the code dependent on the deprecated field as we need to create a contact_info before creating an validation.

Why do we need this? Who uses it, and when?

To be able to remove the contact_info field without any troubles.

Proposed Implementation

Make a EmailValidationRegistry, that replaces the ContactInfoRegistry.

This implies in:

  • Create a new table on the DB to store validations regarding the user email.
  • Migrate contact_info_validations that match an user primary_email_address to email_validation
  • Insert into email_validation whenever an user is created

Contributing

  • I can help by doing more research.
  • I can help by implementing the feature after the proposal above is approved.
  • I can help by testing the feature before it's released.

Code of Conduct

@nicholaspcr nicholaspcr added the needs/triage We still need to triage this label Sep 18, 2023
@nicholaspcr nicholaspcr added this to the v3.28.0 milestone Sep 18, 2023
@nicholaspcr nicholaspcr self-assigned this Sep 18, 2023
@nicholaspcr nicholaspcr removed the needs/triage We still need to triage this label Sep 18, 2023
@github-actions github-actions bot added the needs/triage We still need to triage this label Sep 18, 2023
@nicholaspcr nicholaspcr removed the needs/triage We still need to triage this label Sep 18, 2023
@KrishnaIyer KrishnaIyer modified the milestones: v3.28.0, v3.29.0 Oct 4, 2023
@nicholaspcr nicholaspcr added in progress We're working on it c/identity server This is related to the Identity Server compat/db This could affect Database compatibility labels Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/identity server This is related to the Identity Server compat/db This could affect Database compatibility in progress We're working on it
Projects
None yet
Development

No branches or pull requests

2 participants