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

Commit e890359

Browse files
committed
Merge pull request #492 from firebase/jw-create-user-uid
Return uid of created user
2 parents 617bf63 + b0554df commit e890359

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
@@ -193,20 +193,20 @@
193193
/*********************/
194194
/* User Management */
195195
/*********************/
196-
// Creates a new email/password user. Note that this function only creates the user, if you
197-
// wish to log in as the newly created user, call $authWithPassword() after the promise for
198-
// this method has been resolved.
196+
// Creates a new email/password user. Returns a promise fulfilled with the uid of the created
197+
// user. Note that this function only creates the user, if you wish to log in as the newly
198+
// created user, call $authWithPassword() after the promise for this method has been resolved.
199199
createUser: function(email, password) {
200200
var deferred = this._q.defer();
201201

202202
this._ref.createUser({
203203
email: email,
204204
password: password
205-
}, function(error) {
205+
}, function(error, user) {
206206
if (error !== null) {
207207
deferred.reject(error);
208208
} else {
209-
deferred.resolve();
209+
deferred.resolve(user);
210210
}
211211
});
212212

0 commit comments

Comments
 (0)