I have an expressjs app with everyauth setup.
Everyauth is working fine. Now, I want everyauth to allow users to login into the app whose email id matches a regular expression.
Say I want people to login whose email starts with the letter “foo” (suppose, footest@gmail.com) or is of a specific domain like adeptocorp.com (suppose node@adeptocorp.com)
Kindly provide me some solution to solve this situation
If you use password authentication (which I presume cause otherwise you don’t have to care about e-mail addresses) then you can use the
validateRegistrationfunction.For others, write a piece of connect middleware like:
And use it right after the
everyauthuse like: