Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit afd4195

Browse files
author
jwngr
committed
WIP: Updated () to return a promise
1 parent 4bf90a1 commit afd4195

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/FirebaseAuth.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@
139139
*/
140140
signOut: function() {
141141
if (this.getAuth() !== null) {
142-
this._auth.signOut();
142+
return this._q.when(this._auth.signOut());
143+
} else {
144+
return this._q.when();
143145
}
144146
},
145147

tests/unit/FirebaseAuth.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ describe('FirebaseAuth',function(){
310310
});
311311

312312
describe('$signOut()',function(){
313+
it('should return a promise', function() {
314+
expect(authService.$signOut()).toBeAPromise();
315+
});
316+
313317
it('will call signOut() on backing auth instance when user is signed in',function(){
314318
spyOn(authService._, 'getAuth').and.callFake(function () {
315319
return {provider: 'facebook'};

0 commit comments

Comments
 (0)