I have search everywhere but I can't seem to find the right answer for my problem. So here goes.
I have 2 domains....
http://www.mywebsite.com/ and http://app.mywebsite.com/
Those two domains are in two different rails apps.
Devise resides in app.mywebsite.com. I have a login/signup form in www.mywebsite.com that will connect to app.website.com. How do I do this?
You need to share the model
devise session
Try this
Just modify the config/initializers/session_store.rb
Yourapp::Application.config.session_store :cookie_store, key: '_Yourapp_session', :domain => '.mywebsite.com'
It works on my applications.
UPDATE
For my answer above, I only tried in one application but different schema, and it works.
Devise model not works if you not put gem devise. :D
If different application, you need www.mywebsite.com
access to database of mywebsite.com
Or you can use SSO for your applications.
I think you need this :
Some similar questions :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With