Openid Support for Ruby on Rails Application

React + rails Application AAD and OpenID connect

Your approach using OIDC is correct because rails fully support OIDC. To implement you need to configure the tenant in Azure AD then register a new app in you tenant Azure Active Directory. Go to Azure portal and click on “App registration” and on “New registration”. Lastly, move to your rails app and then integrate your application with Azure active directory. Here is a complete guide that can direct you.

Using Javascript OpenID Selector with Rails

I helped myself and implemented Javascript OpenID-Selector with Rails (though with JQuery instead of Prototype):

https://github.com/vazqujav/authlogic_openid_selector_example

Google Apps and Open ID Authentication in Rails - Security

This is now much easier thanks to omniauth.

Rails 3 authentication with OpenID, Twitter or Facebook

UPDATE - June 2011 - I have been using the omniauth gem recently and I think it is a better solution than using the gems suggested in this answer. It works well with Devise and will give you everything you need in one gem. I created an engine that combines Devise and Omniauth and adds a controller to handle the callbacks. I have quite a few changes planned for the gem and right now I don't consider it a stable plugin, but you may be able to reuse some of the code in the gem: https://github.com/charlotte-ruby/devise_omniauth_engine/blob/master/app/controllers/users/omniauth_callbacks_controller.rb


I recently got this working on Rails 3 (with some problems using OpenID). I don't have a complete working example that you can look at on github, but here is what I am using... all of which have examples in the readme files.

Facebook - fbgraph. Unlike Facebooker, it uses the most recent Facebook API. And the source is very easy to understand if you feel like taking a look at the inner workings. Look at the authentication example in the readme. Dead simple.

Twitter - twitter_oauth Again, check out the readme authentication example. This was fairly easy to set up too.

OpenID - rails/open_id_authentication uses ruby-openid gem, but this repo itself is not a gem, so you will have to drop the code into your app or put in your plugin directory. Take a look at their example in the readme and also inspect the source closely to understand what is going on (its only 130 lines of code). I modified a good bit of it to get it to work with my authentication plugin, but I ran into some problems making it work with both Simple Registration and Attribute Exchange at the same time... but you might be able to get it to work out of the box if the rdoc example is suitable for your app.

Let me know if you have any specific questions on these. I ran into a few problems I was able to resolve with all 3 when I was setting this up.



Related Topics



Leave a reply



Submit