New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Verifiy email using regex and modified Login action #236
Conversation
Hi @flyznex you are so fast, before I could even get the Contributing Guide ready :) For the email check, you probably got the code from the doc here, I originally thought it was too long (#139) so I didn't go for it :) But I agree this should be used instead, I also liked your use of extension method. On the bottom of that same doc they provided some ready to use testing code with both inputs and outputs (img below). Would you mind add some Unit Tests with those? Just add a class And indeed the PasswordSignInAsync with userName does make an extra call to look up user, since I already got the user no need for that. Good catch! Thank you! |
I have created RegexUtilitiesTest.cs with 2 method to verify Extension method working. |
On a closer look the Other than that the PR looks good, I'll leave it open for a few hours if you have any feedback and merge it tonight. Thank you! |
Thanks for your suggest. I have changed |
src/Fan/Helpers/RegexUtilities.cs
Outdated
{ | ||
return false; | ||
if(ex is RegexMatchTimeoutException || ex is ArgumentNullException) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are checking for null on line 25, why would you check for ArgumentNullException
on this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I forgot to remove it. My mistake!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left you a question with a code comment, thanks.
Now you got it to work with static, I'm thinking since I already have a From that point on calling it would just look like |
Yes you can move it to |
Yes we can make it an extension method anytime. And for right now it's probably a bit cleaner keeping fewer classes till till we have more code. I just merged it to Thank you so much for submitting this PR, you are awesome 👍 |
Prerequisites
Description