Hello - I had authentication working fine for a long time on my app. Recently I decided to move away from Sendgrid to Postmark, so I am using a plugin + Postmark to manually re-create the Email Verification/Confirmation flow. I am running into the following error when I test the new flow:
I go into an existing account that I have in DEV, and update the email address using “Update User Credentials” action.
I confirm that the email has been successfully updated, and the email confirmation is correctly swapped to “unconfirmed”.
I get the confirmation email from Postmark (new setup), click the link, and then notice the new email’s confirmation is now “confirmed”.
ISSUE: I then to go change the email again, and want to revert to what it was previously. I get my own “Email is already in use error”. Weird? This is not expected, because I just moved away from this email. When I check the debugger, I see it is locating this same user record that I am currently logged in as and had just changed to a new email… but the email field that is visible in the db does not match (it’s the new one I added).
My suspicion: The “Update User Credentials” is updating the email field visible in the database, but NOT updating the auth email for some reason. This is confirmed because I can log out of this account, and then log back in still using the former/old email. wtf?
Update - I tried creating a brand new account with a different email, then changing that account’s email to something new, then changing it back. It worked. But this same flow still doesn’t work with that other account. So I think it might be specific to a single user. Any idea what this could be or how to reset it?
This feels like a bug but if anyone has any suggestions, please let me know!