Skip to content

Instantly share code, notes, and snippets.

@swennemans
Created February 24, 2015 15:46
Show Gist options
  • Save swennemans/1d11512c2e9320853175 to your computer and use it in GitHub Desktop.
Save swennemans/1d11512c2e9320853175 to your computer and use it in GitHub Desktop.
import Reflux from 'reflux';
import Firebase from 'firebase';
import fireAuth from '../lib/firebaseAuth.js'
var sessionActions = Reflux.createActions([
'login',
'register',
'registerSuccess',
'registerFail'
]);
sessionActions.register.listen(function (email, password) {
fireAuth.register(email, password)
.then(function (data) {
console.log('Data is', data)
sessionActions.registerSuccess;
})
.catch(function (err) {
console.log('Err is', err)
sessionActions.registerFail
});
});
module.exports = sessionActions;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment