Skip to content

Commit

Permalink
docs(auth): update docs to reflect the logout method returning a promise
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanclark authored and davideast committed Dec 26, 2016
1 parent 169ce64 commit 4630a86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/5-user-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import { AngularFire } from 'angularfire2';
export class AppComponent {
constructor(public af: AngularFire) {}

login() {
login() {
this.af.auth.login();
}

Expand Down
8 changes: 4 additions & 4 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,15 @@ constructor(public auth: FirebaseAuth) {
}
```
`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) for more information.
*It is worth noting that logout() is an asynchronous operation. There is an open bug against the Firebase SDK to make this return a promise.*
`logout(): Promise<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) for more information.
Sample Usage:
```ts
signOut(): {
this.af.auth.logout();
this.af.auth.logout().then(() => {
// user logged out
});
}
```
Expand Down

0 comments on commit 4630a86

Please sign in to comment.