jeudi 6 septembre 2018

Using a session based Rails API with Ember

I am trying to use a Rails API with Ember. I need the ember app to connect to a different server by setting the host property on the adapter. When a user logs in, I set the session to have the user id by doing this: session[:user_id] = user.id. However, on the calls to the api after logging in, the session is blank. Is there something I can do to make the session work? I can use postman without any problems using the api, so I believe it can be possible.

I realize a token based API approach would be better, but I am trying to get something to work now and look at using tokens later.




Aucun commentaire:

Enregistrer un commentaire