Open rkilgore opened 6 years ago
@cbierman I just hand you the Promise that firebase's auth service returns for this method - do you want me to catch the errors in the backend, or would it be just as easy for you to do it in the auth service/component?
This will be fixed in #64 , I noticed it last night when I was doing some of the login styling. I just forgot to re-hide the spinner if you login with bad credentials.
I'll keep this open and reference it in the PR so we remember to test it.
@cbierman Mind taking a peek at what I'm trying (unsuccessfully) to do, here? There's something I'm missing about making these validation messages appear.
Hmmmm interesting, I'm not sure 100% sure why this doesn't work. It might be something with the Angular Material librarys mat-form-field
where it's checking the actual loginForm
state behind the scenes.
@rkilgore Idk how much Angular you want to learn, but I could point you to another way to do this if you're interested
Yeah, if you agree with the direction I'm trying to take this, I'd be happy to finish it out. I think you're right about the mat-form-field
thing. I think the secret sauce is somewhere in here: https://material.angular.io/components/input/overview#changing-when-error-messages-are-shown
If I'm not successful after attempting to use that stuff, I am certainly open to attempting a different approach.
Sure! We're using the Reactive Forms method for the forms if that comes up at all. Let me know if I can help.
@cbierman Hey. I finally carved out some time to finish this (having heard y'all are testing this tonight). This seems to work like I wanted it to work. Give it a try!
I noticed that if you attempt to log in as a non-existing user, you can get "stuck" on a silent-error login page. I started some code to handle those situations.
This PR is really only a start, because I'd probably suggest providing more granular feedback. Looks like the firebase stuff will distinguish between invalid email and invalid password.