Ember Simple Auth:会话在刷新时丢失 [英] Ember Simple Auth: Session lost on refresh

查看:120
本文介绍了Ember Simple Auth:会话在刷新时丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用拒绝会话。也没有 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:会话在刷新时丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆