目前,我正试图在rails 4中实现单点登录(SSO)。
假设我有一个主应用程序demo.com和三个子域应用程序(基本上每个都是单独的rails应用程序) sub0.demo.com, sub1.demo.com, sub2.demo.com。
现在我必须通过demo.com登录所有的应用程序(假设我在所有应用程序上都有相同的用户)
为此,我查看了this post并尝试实现它。
所以我有以下问题
1. As I am working on local, set the domain in `/etc/hosts/` file127.0.0.1 demo.com
127.0.0.1 sub0.demo.com
127.0.0.1 sub1.demo.com
1. Also made changes in the following files from the `sub1.demo.com`
session_store.rb
Rails.application.config.session_store :cookie_store, :key => '_tourlyapp_session', :domain => "demo.com"但是,即使我为所有的应用程序设置了相同的键,它也无法工作。
有什么我遗漏的东西吗。
发布于 2015-09-29 12:51:48
你试过看门人宝石吗,这是为了你现在的样子,https://github.com/doorkeeper-gem/doorkeeper,我也找到了与它相关的this帖子
https://stackoverflow.com/questions/32843992
复制相似问题