0

Currently I am trying to implement Single Sign On (SSO) in rails 4.

Consider the I have one main app demo.com and three sub-domain apps (basically each one is separate rails application) sub0.demo.com, sub1.demo.com, sub2.demo.com

Now I have to login all of the application through the demo.com (let consider I have same users on all of the applications)

For this I looked into the this post and tried to implement it.

So I have a following questions

  • Is it the good way for doing this?

  • As per the given link, I am trying to implement the given functionality for this I have did following steps

    1. As I am working on local, set the domain in /etc/hosts/ file

    127.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"

But it is not working even though I have set the same key for all the application.

Is there any thing I am missing.

Community
  • 1
  • 1
I-am-simple-user
  • 409
  • 7
  • 19
  • There is zillion gems that could be used for this; I don’t think SO’s purpose is to suggest different kind of things you could try to do. – Smar Sep 29 '15 at 13:42

1 Answers1

0

Have you tried doorkeeper gem , it is for what you are looking https://github.com/doorkeeper-gem/doorkeeper I have also found this post related to it

Community
  • 1
  • 1
Arvind
  • 2,671
  • 1
  • 18
  • 32