The user has to use their phone number to sign up, so I have used the email in the login function with “@domain.com” to compare phone numbers in the data base. However, I’m trying to allow the user to add an optional email incase they forget their password or phone number. How can I do this while keeping the phone number?
Why don’t you create another e-mail data type into the User’s database?
This would seem like the answer to me. If you create an “email2” field and store their email there, you should be able to use that field when sending emails, including password reset links.