I just finished a RPXNow Rails plugin and gem
so that everyone can enjoy the great usability + simplicity of RPX
Use OpenId / Google / Yahoo / MySpace / Facebook connect transparently through the same interface.
Usage
#login.erb RPXNow.embed_code('mywebsite',url_for(:controller=>:session, :action=>:rpx_token)) #sessions_controller.rb def rpx_token data = RPXNow.user_data(params[:token],'YOUR RPX API KEY') self.current_user = User.find_by_identifier(data[:identifier]) || User.create!(data) redirect_to '/' end
Doing the same with OpenId is impossible, since every provider has his own standards of which fields to supply and how to name them.
Happy login!
Do you have any tips on how to get RPX to work with a WordPress blog?
would be interesting to use rpx as plugin for wordpress, but i have not seen such a thing…
aybe a good start woulkd be to simply port the RPXNow library to php, and start with this.
the wordpress plugin can be found here http://wordpress.org/extend/plugins/rpx/
Typo on this line, should read RPXNow
data = RPXNew.user_data(params[:token],’YOUR RPX API KEY’)
opps, thanks 🙂
Thanks for this great plugin. I’m getting an, undefined method `find_by_identifier’. Where is this method defined or have I missed something?
you need an identifier(string) column on your model -> find_by_identifier works, I just added an example migration to make that easier 😉
(identifier is used to store the unique identifier every provider assigns to its users)
Hi, thanks very much. Turns out i’d spelt identifier wrong in my migration. Doh!
I also misspelled it several times 😉
Will this work with rails 2.1?
It works with anything, sinatra/waves/merb/rails 1.2.6 / 2.1 / 2.3.3, is basically only a gem also available as rails plugin, so there should be no problems.
i getting the error from RPX->data not found,as i am implementing is asp.net.
Can anybody help me,URGENT!!!!!!!!!
data not found == identifier was wrong / already has been used, make sure to pass the correct identifier, and to not pass it e.g. twice
Hi Michael,
Thanks for the great information.
I have a very newbie question:
RPXNow.embed_code(‘mywebsite’,rpx_token_sessions_url)
what is “rpx_token_sessions_url” how do i construct it?
I have registered an application called mosaicit at RPX website.
and am trying to connect from localhost then how should my url look like ?
Thanks,
Pratik
I just updated this part, hope its clearer now 😉
i get the same error: rpx -> data not found (Error code 2 ) , could you elaborate a bit more
Thanks
I only got this error when logging in twice with the same identifier, e.g. using refresh page, or when the identifier was wrong or when the identifier was very old
When logging into twitter it is looking for an outh_calback which does not appear to exist. How do I get twitter to work with the rails gem?
You can try the example application @ http://github.com/grosser/rpx_now_example , everything works there.