-
Notifications
You must be signed in to change notification settings - Fork 2.2k
chore(auth): Auth fixes and method additions #132
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
Conversation
|
|
||
| createUser(creds: FirebaseCredentials): Promise<FirebaseAuthData> { | ||
| return new Promise<FirebaseAuthData>((resolve, reject) => { | ||
| this._fbRef.createUser(creds, (err, authData) => { |
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.
Since createUser returns a promise, couldn't this be:
createUser(creds) {
return this._fbRef.createUser(creds);
}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.
While this is true, the typings don't reflect that so I have to wrap it for the time being. I'll see if I can get typings updated so we can simply return from the method.
|
LGTM with a little cleanup! |
|
Whenever I use the
Is there something that needs to be imported? I'm trying to do this in my app.ts: |
This PR closes:
#71, #107, #124, #112, #106.
Changelog:
af.auth.login({ email: 'email', password: 'pass' })fails with just credentials. login incorectly assumes that the first argument is credentials iff there are two arguments #71, login doesn't work with Password authentication #107FirebaseAuthState. FirebaseAuthState is missingexpiresfield #112af.auth.getAuth(). FirebaseAuth should expose authData synchronously #124af.auth.createUser({ email: 'email', password: 'pass' })AngularFire wrapper for createUser is missing #106