1
votes

If a user starts out in my app unauthenticated and then logs in, I can have my Rails back-end return the user data, and create a User model in my Ember app.

However, what if a user starts out in the app authenticated? How can I use session to fetch the user's details from Rails?

I'm using the ember-simple-auth-devise authenticator.

1

1 Answers

0
votes

I was able to use

this.get('session.user_email')

in my application route to find the authenticated user.


The better way to do it is to reopen the session object and add a property that references the authenticated user. See this example from the guides.