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

Commit db28d45

Browse files
committed
Merge pull request #468 from firebase/jw-auth-fixes
Minor fixes to $firebaseAuth
2 parents f0dd187 + 239e2de commit db28d45

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/FirebaseAuth.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@
7171
},
7272

7373
// Authenticates the Firebase reference with a custom authentication token.
74-
authWithCustomToken: function(authToken) {
74+
authWithCustomToken: function(authToken, options) {
7575
var deferred = this._q.defer();
7676

77-
this._ref.authWithCustomToken(authToken, this._onLoginHandler.bind(this, deferred));
77+
this._ref.authWithCustomToken(authToken, this._onLoginHandler.bind(this, deferred), options);
7878

7979
return deferred.promise;
8080
},
@@ -138,14 +138,14 @@
138138
// Asynchronously fires the provided callback with the current authentication data every time
139139
// the authentication data changes. It also fires as soon as the authentication data is
140140
// retrieved from the server.
141-
onAuth: function(callback) {
141+
onAuth: function(callback, context) {
142142
var self = this;
143143

144-
this._ref.onAuth(callback);
144+
this._ref.onAuth(callback, context);
145145

146146
// Return a method to detach the `onAuth()` callback.
147147
return function() {
148-
self._ref.offAuth(callback);
148+
self._ref.offAuth(callback, context);
149149
};
150150
},
151151

0 commit comments

Comments
 (0)