Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. signupUser(email: string, password: string) {
  2. firebase.auth().createUserWithEmailAndPassword(email, password)
  3. .then(
  4. user => {
  5. this.store.dispatch(new AuthActions.Signup());
  6. firebase.auth().currentUser.getToken()
  7. .then(
  8. (token: string) => {
  9. this.store.dispatch(new AuthActions.SetToken(token));
  10. }
  11. )
  12. }
  13. )
  14. .catch(
  15. error => console.log(error)
  16. )
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement