Created
March 2, 2015 16:13
-
-
Save CurtisHumphrey/5dd6fa55c2674ae03bc6 to your computer and use it in GitHub Desktop.
example from if-firebase-auth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login: function(user) { | |
return $q(function(resolve, reject) { | |
BACKEND.authWithPassword(user, function(error, authData) { | |
if (error === null) { | |
// user authenticated with Firebase | |
getUserData(authData); | |
temporaryPassword = authData.password.isTemporaryPassword; | |
authServiceError = {}; | |
resolve('logged in'); | |
} else { | |
authServiceError = error; | |
reject(error); | |
} | |
}); | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had not seen "authData.password.isTemporaryPassword" before in the Firebase Docs. Found it not in the API but in the guide: https://www.firebase.com/docs/web/guide/login/password.html