[crosspost] User Authentication between Wordpress and Rails app

18 views
Skip to first unread message

Shaahul Hameed

unread,
Mar 27, 2014, 2:13:29 AM3/27/14
to bangal...@googlegroups.com, Sahil Gore
Hi Members

We are trying to share authentication information between a wordpress site and a rails app. Here's what we are trying to do:

1. Application "X" is on wordpress hosted on example.com
2. Application "Y" is built in RoR (ruby 2, rails 4) hosted on form.example.com. It uses 'devise' for managing authentication. 
3. On Application "X", we need to show a login form (email, password, submit button) in a corner of the page. The form is loaded from Application "Y" and submitted back to it. 
5. If login is successful, username is fetched from 'Y" and shown on "X". If login is unsuccessful, error message shown on "X". All this should happen without leaving example.com
6. If the user closes the window and comes back to this page later on, the session should be read from "Y" and current login status should be shown.

Any pointers on solving this is greatly appreciated.


Thanks

Hameed

Dheeraj Kumar

unread,
Mar 27, 2014, 3:39:10 AM3/27/14
to bangal...@googlegroups.com, Sahil Gore
You have a couple of options - OAuth, jQuery ajax + CORS, token auth in Devise < 3, Jose Valim's safe token auth example in Devise >= 3, even a PHPSESSID -> rails session map in Redis if you wish  :D 


--
You received this message because you are subscribed to the Google Groups "BANGALORE RUG-Ruby Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bangalorerug...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages