String parameters in ember


#1

How can i pass string parameters to ember.js from server?

I’m using omniauth in rails, and i need it to redirect to /callback?auth_token=123 to ember. When i was using ember without location history, this was working fine. But after switching, ember clears the uri after it loads and only keeps the route. I’ve tried using query-params but no luck there either.

The only way right now is to completely ignore ember, and depend on index.html to catch and save the parameters before ember gets in. Then ember can look into localstore or cookies to bet data. But its an ugly hack and i hope someone has a smarter solution.


#2

What’s the ideal solution? To keep auth_token=123? Or is it good enough to provide a startup hook to save that onload auth_token` value?


#3

I think startup hook would be perfect. Just enough to get the data and save it as localstorage.