Skip to content

fix for signup in signup.vue #6

Open
@szczynk

Description

@szczynk

for whose get error when signup here a fix for you
i'm using firestore as database

`signup.vue

methods: {

...mapActions('modules/user', [ 'login' ]),

async signUp () {

  try {

    const firebaseUser = await firebaseApp.auth().createUserWithEmailAndPassword(this.email, this.password)

    await this.writeUserData(firebaseUser.user.uid, firebaseUser.user.email)

    await this.login(firebaseUser.user)

    this.$router.push('/protected')

  } catch (error) {

    console.log(error.message)

  }

},

writeUserData (userId, email) {

  return firebaseApp.firestore().collection('users').doc(userId).set({

    email: email

  })

}

}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions