question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

createUser is not a function with Emberfire 2.0

See original GitHub issue

Hi There,

I have recently upgraded to Emberfire 2.0 and Firebase 3.0. The upgrade went very smooth over all. Everything seems to be forward compatible except for the “createUser” call. I am using Torii with email/password authentication.

When I try to call:

this.get('firebase').createUser({...}) I receive the error: this.get(...).createUser is not a function If you have nay feedback it would be most appreciated.

Thank you

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

8reactions
tstirratcommented, Jun 20, 2016

Hey, yes the new Firebase 3.0 SDK changed the API. Now you use firebase.auth().createUserWithEmailAndPassword

I am working on a migration guide that will address all these changes.

Here is the updated way to do it:

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();
    });
  }

}
0reactions
es6Testcommented, Jun 27, 2017

@tstirrat I was wondering what advantage setting email on the user has, given it is stored in the Authentication table?

const user = this.store.createRecord('user', {
        id: userResponse.uid,
        email: userResponse.email
      });```

![image](https://user-images.githubusercontent.com/13809207/27600425-cc1e53ce-5b63-11e7-9a7d-bc4ead9d2ee1.png)

Read more comments on GitHub >

github_iconTop Results From Across the Web

createUser is not a function with Emberfire 2.0 #390 - GitHub
I am using Torii with email/password authentication. When I try to call: this.get('firebase').createUser({...}) I receive the error:
Read more >
vuejs integration with firebase gives "createUser is not a ...
createUser is admin sdk function, check docs of managing users on ... I'm not familiar with the createUser method you are trying to...
Read more >
Ember 2.0 Example App With Firebase And Login Authentication
This tutorial will cover the following concepts: EmberFire; torii/authentication; helpers; pods; utilities; routes; models; relationships ...
Read more >
SOLVED - TypeError: Accounts.createUser is not a function
I am creating one app and getting the following error: TypeError: Accounts.createUser is not a function. Here is my Code:
Read more >
[Solved]-Newbie Emberfire Querying-ember.js - appsloveworld
How to use emberfire to query a firebase db for all items with name equalTo xyz in ember.js 2.0.0? Is there a way...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found