Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- signupUser(email: string, password: string) {
- firebase.auth().createUserWithEmailAndPassword(email, password)
- .then(
- user => {
- this.store.dispatch(new AuthActions.Signup());
- firebase.auth().currentUser.getToken()
- .then(
- (token: string) => {
- this.store.dispatch(new AuthActions.SetToken(token));
- }
- )
- }
- )
- .catch(
- error => console.log(error)
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement