It’s made a bit more complicated as now all the users that were created more than a month ago are not saved as lowercase so the auth works.
What’s the best solution? Migrate all current users to have lowercase email and update the findOrCreate function? Convert to lowercase in the Azure AD strategy?
@gergo you might know the best way to implement this?
On second thoughts, saving the user’s email as lowercase is only useful using the local strategy. For the federated logins (GitHub, AzureAD) the user won’t enter an email address so saving as lowercase isn’t an issue. I’ve created a PR just altering the local strategy to show what I mean.
With this fix I can use any of the strategies successfully now.
Hey @peter.grainger good catch, this case is unfortunately is -ed.
Regarding the implementation, i would be happier, if all email storage would be consistent, and no undocumented edge cases were left in the implementation.
But lets continue this on the PR discussions, I think there is an easy fix for it.