Skip to content

Conversation

@mukesh51
Copy link
Contributor

Added AngulaFireAuth API's as per issue #93. Please review and let me know, if any changes are needed.

Added AngulaFireAuth API's as per issue #93. Please review and let me know, if any changes are needed.
@katowulf
Copy link
Contributor

katowulf commented Sep 27, 2016

@mukesh51 fixing typo (copied from another CL) and adding this change to make this consistent with the auth guide.

....
```

This is similar to how firebase provides authentication
Copy link
Contributor

@katowulf katowulf Sep 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revise these to just say: See [link] for more and place these up in the description instead of below the usage example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katowulf Updated as advised.

The credentials object is an object containing email and password of the user to be created. Similar to [createUserWithEmailAndPassword](https://firebase.google.com/docs/reference/js/firebase.auth.Auth#createUserWithEmailAndPassword)
```ts
createNewUser(): Promise<FirebaseAuthState> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be: createNewUser( properties:Object ): Promise<FirebaseAuthState> {?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katowulf Updated as advised. yes it's a
createNewUser( properties:Object ): Promise

}
```
`logout(): void`: Deletes the authentication token issued by Firebase and signs user out. See [Auth.signOut()](https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signOut) in the Firebase API reference.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth noting that logout() is an asynchronous operation. There is an open bug against the Firebase SDK to make this return a promise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katowulf Thanks for update. I was unaware that this is an open bug against firebase. I pasted the contents as per your suggestion. Hope that's ok.

```
`getAuth(): FirebaseAuthState` : Returns the client's current Authentication State.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is FirebaseAuthState documented? Can we link to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FirebaseAuthState is an interface in the definition file auth_backend.d.ts. I added the method signature in documentation, which might be helpful, incase someone is digging for more information.
I think it is similar to https://firebase.google.com/docs/reference/js/firebase.auth.AuthCredential , but I am not sure, hence didn't link it. Please verify and let me know as well. Thanks.,

@katowulf
Copy link
Contributor

Hi @mukesh51! Great work! I added a few comments. Please address.

Updated API's based on the comments received.
@mukesh51
Copy link
Contributor Author

mukesh51 commented Oct 9, 2016

Hi @katowulf . Did you get a chance to review this. Anything missing ??

@katowulf
Copy link
Contributor

Great work! Sorry it took a while to get these reviewed.

@katowulf katowulf merged commit 6f5231c into angular:master Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants