× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Ember Simple Auth: Session lost on refresh

Marco Otte-Witte
Mar 07, 2015
<p>The problem is that you have neither <code>user_token</code> nor <code>user_email</code> in the session which are required for the session to be authenticated. So as soon as you reload the page the authenticator's <a href="https://github.com/simplabs/ember-simple-auth/blob/master/packages/ember-simple-auth-devise/lib/simple-auth-devise/authenticators/devise.js#L79"><code>restore</code> method</a> rejects the session. Also without <code>user_token</code> and <code>user_email</code> the <a href="https://github.com/simplabs/ember-simple-auth/blob/master/packages/ember-simple-auth-devise/lib/simple-auth-devise/authorizers/devise.js#L35">authorizer</a> is not going to actually authorize any requests.</p> <p>You'll need to change your server side devise setup as <a href="https://github.com/simplabs/ember-simple-auth/tree/master/packages/ember-simple-auth-devise#server-side-setup">described here</a>.</p> <p>This tip was originally posted on <a href="http://stackoverflow.com/questions/25215010/Ember%20Simple%20Auth:%20Session%20lost%20on%20refresh/25227676">Stack Overflow</a>.</p>
comments powered by Disqus