简体   繁体   English

不同Rails应用之间的通用身份验证

[英]Common Authentication Between Different Rails Apps

I have an existing rails app which is running on mongoDB and devise for authentication. 我有一个现有的rails应用程序,该应用程序正在mongoDB上运行并设计用于身份验证。 Now i want to configure an open source forum (forem) at the subdomain of my app. 现在,我想在我的应用程序的子域中配置一个开源论坛(forem)。

All i want is the common authentication for both of these. 我想要的只是这两个的通用身份验证。 If my users are logged in my main_app then click on forum then they should don't need to sign in again for the forum. 如果我的用户登录了我的main_app,则单击“论坛”,则他们无需再次登录该论坛。

I could have integrate the forum directly with same User model but the problem is my app is using mongoDB and the forum is built up on ActiveRecord. 我本可以直接将论坛与相同的用户模型集成在一起,但是问题是我的应用程序正在使用mongoDB,并且该论坛是在ActiveRecord上构建的。

So now both apps have their independent databases. 因此,现在两个应用程序都有其独立的数据库。 What is the best approach to merge their authentication and every request from forum app is authenticated using my main_app (running on mongoDB) ?? 合并其身份验证的最佳方法是什么?使用我的main_app(在mongoDB上运行)对论坛应用程序发出的每个请求进行身份验证?

在Rails应用程序中创建身份验证api,然后让论坛调用它进行身份验证,而不是管理自己的用户

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

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