Ember Firebase Authentication

237 Views Asked by At

I've successfully connected my app to Firebase and am authorizing users while also adding additional user information to a user-profile model. There's a few things I'd like to do with this data.

First of all, upon signup (username, password), I'm asking the user for some additional information (name, avatar, city, etc). How can I use this data alongside the authed user (i.e. Welcome :name site wide)? Additionally, I'd like this user to only see their own profile and be able to edit their own profile. A bit stumped currently and just looking for next steps...

Thanks!

1

There are 1 best solutions below

0
On

There are a few different ways to handle this.

  • For a couple/long lived app, I would use Ember Simple Auth. By complex, I mean needing lots of automatic behavior based on authentication status
  • Look into Ember Data adapters and addons like emberfire, which was designed to be used with firebase. See Ember Observer to find more addons.
  • set this information by hand on a Service (and keep your Auth functions there)
  • create a user Model, create a user record on login, and reference it anywhere in the app with peekRecord. This is helpful if the user has any relational data
  • A combination of the two above