All Projects → nicolasblanco → Devise_rpx_connectable

nicolasblanco / Devise_rpx_connectable

Licence: mit
Authenticate your users with RPX in your Rails application using Devise

Programming Languages

ruby
36898 projects - #4 most used programming language

h1. Devise RPX Connectable

This gem is not maintained anymore. Feel free to take over this project by forking it.

Devise << RPX by "Nicolas Blanco":http://github.com/slainer68

h2. What is Devise?

A great authentication gem for Rails applications.

"http://github.com/plataformatec/devise":http://github.com/plataformatec/devise

h2. What is RPX (now Janrain Engage)?

RPX (now called Janrain Engage) is a Software as a Service (SaaS) that helps you manage multiple authentication methods (FacebookConnect, Google, Twitter, OpenID, MySpace...) using a single API. It also provides a multilingual connection widget. Instead of managing multiple authentication providers and APIs, you just need to handle one.

Janrain Engage provides free and paid accounts.

See "Janrain Engage official homepage":https://rpxnow.com/. If you want to see what it looks like, you may signup on the Janrain Engage website as it uses Engage for signup :).

h2. What is Devise RPX Connectable?

Devise RPX Connectable is a gem to integrate Janrain Engage authentication in a Rails application using Devise.

Please note that this is an unofficial library. It is neither affiliated with, nor endorsed by Janrain Inc.

h2. Dependencies

Devise RPX Connectable should be compatible with the latest Rails and Devise versions (currently Rails 3.0+ and Devise 2.1.2+).

IMPORTANT : This gem is now ONLY COMPATIBLE with Rails 3, if you want to use it with Rails 2, please use version 0.1.3.

h2. Installation

As usual... Add @gem "devise_rpx_connectable"@ in your Gemfile...

h2. Setup

Devise: Setup

See "Devise":http://github.com/plataformatec/devise documentation for instructions on how to setup Devise.

Devise: Model

Add @:[email protected] in your Devise model (ie. User.rb)

  devise ..., :rpx_connectable

Devise:Setup

In the Devise initializer (may be @config/initializers/[email protected]) :

  Devise.setup do |config|
    ...
    config.rpx_application_name = "mytestingapp" # The name of your RPX application (this is the name, NOT the API key!)
  end

RPXNow:API Key

In @config/[email protected] or @config/environments/[email protected] (to set a different key for each environment...) :

  ...
    RPXNow.api_key = "aaaabbbbbccccdddddeeeeefffff"
  ...

Migrations

Your model needs one attribute/column to store the RPX identifier. By default, this identifier is @[email protected] So don't forget to add that field to your model (using a migration or whatever...).

Views

The RPX connection widget can be added in your application using a link or an iframe. If you choose to use a link, the connection widget can be displayed in a new page (standard link) or using Javascript in overlay.

I added an easy to use helper to add a link to the RPX connection popup.

  

If you use the link alone, users will be redirected to a new page. If you want the more sexy popup in overlay, you need to add the JS code before the @

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].