Skip to content

Commit 4630a86

Browse files
ryanclarkdavideast
authored andcommitted
docs(auth): update docs to reflect the logout method returning a promise
1 parent 169ce64 commit 4630a86

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/5-user-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import { AngularFire } from 'angularfire2';
6969
export class AppComponent {
7070
constructor(public af: AngularFire) {}
7171

72-
login() {
72+
login() {
7373
this.af.auth.login();
7474
}
7575

docs/api-reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,15 +317,15 @@ constructor(public auth: FirebaseAuth) {
317317
}
318318
```
319319
320-
`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.
321-
322-
*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.*
320+
`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.
323321
324322
Sample Usage:
325323
326324
```ts
327325
signOut(): {
328-
this.af.auth.logout();
326+
this.af.auth.logout().then(() => {
327+
// user logged out
328+
});
329329
}
330330
```
331331

0 commit comments

Comments
 (0)