Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.factory('authFactory', ['FBMSG', '$firebase', '$firebaseAuth', function(FBMSG, $firebase, $firebaseAuth) {
- var authFactory = {};
- // var ref = new Firebase(FBMSG);
- // Initialize FirebaseAuth
- var auth = $firebaseAuth();
- console.log(auth);
- authFactory.createUser = function(email, password) {
- return auth.$createUser({
- email: email,
- password: password
- })};
- // Authentication
- authFactory.authUser = function(email, password) {
- return auth.$signInWithEmailAndPassword({
- email: email,
- password: password
- });
- }
- return authFactory;
- }]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement