简体   繁体   English

Rails:静态身份验证失败

[英]Rails: Restful Authentication Failed

I have two applications that use same database. 我有两个使用相同数据库的应用程序。 Let's call them Site and API. 我们称其为Site和API。 I'm using Restful Authentication for user management. 我正在使用Restful Authentication进行用户管理。

If I create a user from "Site" this user doesn't work when try to login from API and vise versa. 如果我从“站点”创建用户,则尝试从API登录时,该用户将无法工作,反之亦然。 I can see the records are being saved in the same table. 我可以看到记录被保存在同一张表中。

Am I missing something? 我想念什么吗? It should work? 它应该工作吗?

I'm using Rails 3. 我正在使用Rails 3。

In your initializers/site_keys.rb REST_AUTH_SITE_KEY should be the same in your both applications then authentication will work properly in your both applications. 在您的初始化器/site_keys.rb中,REST_AUTH_SITE_KEY在两个应用程序中均应相同,然后身份验证将在两个应用程序中正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM