How to encrypt alternative email addresses in the database?

Created on 10 December 2023, about 1 year ago
Updated 2 March 2024, 10 months ago

Problem/Motivation

I'm trying to encrypt user emails saved in the database with this module.

I'm using the Email Registration module to have users log in with their email address.

The Alternative User Emails module is great because, when used in combination with the Email Registration module, users can log in with any email address they have ever used on the site thanks to the query altering feature.

I am encrypting the regular user account email address with the Database Email Encryption (dbee) module . This works great, but it doesn't support Alternative User Emails.

I tried enabling the Field Encrypt module on the user field added by Alternative User Emails. This sort of works-- when I access the list of users via JSON:API, I can see the decrypted email addresses as I expect. However, when logging in with the Email Registration module, users cannot use any of the alternative email addresses because they are not decrypted in time (I think).

So, as the maintainer, do you have any thoughts on how to encrypt the email addresses in a way that they will always be decrypted when queried, such as when logging in via email registration? I will attempt to write this code myself; I'm asking here though because you might know better than me about where to get started.

💬 Support request
Status

Closed: works as designed

Version

1.0

Component

Documentation

Created by

🇯🇵Japan ptmkenny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024