"Update User Credentials" is not updating auth email

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:

  1. I go into an existing account that I have in DEV, and update the email address using “Update User Credentials” action.
  2. I confirm that the email has been successfully updated, and the email confirmation is correctly swapped to “unconfirmed”.
  3. I get the confirmation email from Postmark (new setup), click the link, and then notice the new email’s confirmation is now “confirmed”.
  4. 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!

Does logging out and logging back in again to refresh the session fix it?

It does not. But the weird part is that now either email (the old email, or the new email) works to log into the same account…

It does not. But the weird part is that now either email (the old email, or the new email) works to log into the same account…

Did you use Oauth/Social login?

Nope. Just good old fashioned email and password.