Ember Simple Auth: Session lost on refresh

前端 未结 4 772
孤城傲影
孤城傲影 2021-01-02 05:35

I\'m using Ember Simple Auth Devise v 0.6.4 in an Ember-cli app.

I can log in fine but when I refresh the page the session is lost. (Tested in Firefox and Chrome.) <

4条回答
  •  再見小時候
    2021-01-02 06:07

    The problem is that you have neither user_token nor user_email in the session which are required for the session to be authenticated. So as soon as you reload the page the authenticator's restore method rejects the session. Also without user_token and user_email the authorizer is not going to actually authorize any requests.

    You'll need to change your server side devise setup as described here.

提交回复
热议问题