Firebase 3.0 Email/Password sign up


#1

Long time lurker – first time poster.

I can’t for the life of my figure out how to implement a sign up form with Firebase 3.0 and ember.

I’ve worked through Yoember and have been able to use authentication for sign in with Google, but I can’t do so with email/password.

Here’s what my sign-up controller looks like

import Ember from 'ember';

export default Ember.Controller.extend({
  firebaseApp: Ember.inject.service(),

  actions: {

createUser(email, pass) {
  const auth = this.get('firebaseApp').auth();
  auth.createUserWithEmailAndPassword(email, pass).then((userResponse) => {
    const user = this.store.createRecord('user', {
      id: userResponse.uid,
      email: userResponse.email
    });
    return user.save();
  });
}

  }

});

Let me know if you need any of my other code snippets, but my error message is EmberError {description: undefined, fileName: undefined, lineNumber: undefined, message: "Nothing handled the action 'signUp'. If you did ha…er in a controller, causing the action to bubble.", name: "Error"…}

I’m using Torii.

Again, please let me know if y’all need more information.


#2

Hi! The error says it is looking for a signUp action but from the code you pasted it looks like yours is called createUser?

If that isn’t it, perhaps you can share the sign-up template as well.


#3

See. This is what happens when you blindly copy and paste from stackoverflow.

Thanks oskar. Calling signUp fixed the problem. I need to do some serious refactoring too. Thanks!!!


#4

Hi. @chrisdeso i was also trying for email/password signup. i am calling the correct function. It throws an error saying auth is not a function. can you please help me out