Guest User

Untitled

a guest
Apr 9th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. I have two applications, appA and appB. I want to use single sign on
  2. for both the apps.
  3. Meaning, if a user logs in to appA, he dont have to login to appB and
  4. conversely, if a user logged out of appA, it logs him out of appB too.
  5. Just like in google's various products.
  6.  
  7. I created the sessions table in appA. How do i access the sessions
  8. table in appB.
  9. I tried to put ActiveRecord::Base.establish_connection :appA in the
  10. config\initializers\session_store.rb of appB,
  11. but that connects the whole appB application to appA database. I only
  12. want to access the sessions table.
  13.  
  14. How do i do it?
  15.  
  16. database.yml of appB has:
  17. appA:
  18. adapter: mysql
  19. database: appa_dev
  20. pool: 5
  21. username: app_user
  22. password: app_pwd
  23. host: localhost
Add Comment
Please, Sign In to add comment