问题描述
我正在使用拒绝会话。也没有 user_token
和 user_email
不会真正授权任何请求。 p>
您需要将服务器端设置更改为。
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.)
Right after logging in, inspecting the localStorage shows the session and after refreshing localStorage is empty.
Here's what's in the local storage when I sign in:
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.
这篇关于Ember Simple Auth:会话在刷新时丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!