Coder Social home page Coder Social logo

devise_rpx_connectable's Introduction

Devise RPX Connectable

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

Devise << RPX by Nicolas Blanco

What is Devise?

A great authentication gem for Rails applications.

http://github.com/plataformatec/devise

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. If you want to see what it looks like, you may signup on the Janrain Engage website as it uses Engage for signup :).

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.

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.

Installation

As usual… Add gem "devise_rpx_connectable" in your Gemfile…

Setup

Devise: Setup

See Devise documentation for instructions on how to setup Devise.

Devise: Model

Add :rpx_connectable in your Devise model (ie. User.rb)

  devise ..., :rpx_connectable

Devise:Setup

In the Devise initializer (may be config/initializers/devise.rb) :

  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/application.rb or config/environments/YOUR_ENV.rb (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 rpx_identifier.
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.

  <%= link_to_rpx "Signin using RPX!", user_session_url %>

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 </body> of your layout.
An helper is also included for this task :

      ...
      <%= javascript_include_rpx(user_session_url) %>
    </body>
  </html>

If you want to display the connection widget in an iframe inside a page :

  <%= embed_rpx user_session_url %>

Advanced

There is some advanced features that you may use…

Devise:Setup

  Devise.setup do |config|
    ...
		config.rpx_auto_create_account = true # false if you don't want to create users automaticaly. True by default.
		config.rpx_additional_user_data = [:verifiedEmail, :url, :providerName,:photo] # default [], get some extra profile info from RPXnow, default only a few fields are available in the rpx_user object (https://rpxnow.com/docs#profile_data)
		config.rpx_extended_user_data = true # false by default, extended data only available for Plus and Pro RPX users (https://rpxnow.com/docs#api_auth_info)
  end

Devise:Model

There are two hooks that you may define in your model : before_rpx_success (called before each successful connection) and before_rpx_auto_create (called only once before the auto saving of the user instance, when rpx_auto_create_account is enabled).
You get in parameter the RPX User object from the RPXNow gem which is basically a Hash containing more or less information depending on your RPX configuration and account.
Read the RPXNow gem documentation for more information about this…

  def before_rpx_success(rpx_user)
    # Do something with rpx_user...
  end

  def before_rpx_auto_create(rpx_user)
    # Do something with rpx_user
  end

TODO

  • Handle RPX multiple accounts mapping?

Contributors

Thanks

The base of this gem was heavily inspired from the Devise Facebook Connectable gem by Jonas Grimfelt and other Devise gems.
This gem also uses the great rpx_now by Michael Grosser

License

Released under the MIT license.
Copyright © 2010 Nicolas Blanco

devise_rpx_connectable's People

Contributors

ahmadsoliman avatar dohmoose avatar rubenfonseca avatar tardate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

devise_rpx_connectable's Issues

more info than rpx_invalid?

I'm trying to print out flash messages on errors that occur during authentication using devise_rpx_connectable. When I try to sign in using, for example, a google account that happens to have the same email as an openid user that already signed up, I get an error in the logs about an identical email address already in the system. However, the message I get is "rpx_invalid".

I'm using pretty vanilla error message flashing...

  <% flash.each do |name, msg| %>
    <%= content_tag :div, msg, :id => "flash_#{name}" %>
  <% end %>

Is there a way to get more specific errors?

thanks!

forgot password

At the moment users who are connected via rpx are able to click on the forgot password link provided by devise. This will send an e-mail and will reset the users password (which is null at that time). The users is now able to log on locally and via rpx, I think this is a little confusing for the user.

Is it possible the override the create method (responsible for sending the forgot password e-mail) in the devise passwords_controller.rb?

Maybe you can check if the e-mail entered is a rpx_connected user and then display a message e.g. "This function is not available if you are logged in via rpx, go to #{user.providername} to update your password"

Please let me know if I can help.

Thanks

Regards

Chris

ActionController::InvalidAuthenticityToken in Devise/sessionsController#create

Hi, I followed the instructions but I get this. Devise is working

ActionController::InvalidAuthenticityToken

Rails.root: /home/grigio/Documenti/base-app with rpx
Application Trace | Framework Trace | Full Trace

/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/request_forgery_protection.rb:125:in verify_authenticity_token' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:439:in_run__1010667671__process_action__1623385099__callbacks'
/home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:404:in send' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:404:in_run_process_action_callbacks'
/home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:in send' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:inrun_callbacks'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/abstract_controller/callbacks.rb:17:in process_action' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/rescue.rb:8:inprocess_action'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/abstract_controller/base.rb:123:in process' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/abstract_controller/rendering.rb:39:inprocess'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal.rb:84:in dispatch' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/rack_delegation.rb:14:indispatch'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal.rb:124
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:29:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:29:incall'
rack-mount (0.6.3) lib/rack/mount/route_set.rb:148:in call' rack-mount (0.6.3) lib/rack/mount/code_generation.rb:89:inrecognize'
rack-mount (0.6.3) lib/rack/mount/code_generation.rb:73:in optimized_each' rack-mount (0.6.3) lib/rack/mount/code_generation.rb:88:inrecognize'
rack-mount (0.6.3) lib/rack/mount/route_set.rb:139:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:458:incall'
warden (0.10.3) lib/warden/manager.rb:35:in call' warden (0.10.3) lib/warden/manager.rb:34:incatch'
warden (0.10.3) lib/warden/manager.rb:34:in call' /home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:31:incall'
/home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/connection_adapters/abstract/query_cache.rb:35:in cache' /home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:11:incache'
/home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:30:in call' /home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/connection_adapters/abstract/connection_pool.rb:365:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/head.rb:14:in call' rack (1.1.0) lib/rack/methodoverride.rb:24:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/params_parser.rb:19:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/flash.rb:167:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/session/cookie_store.rb:107:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/cookies.rb:202:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/callbacks.rb:46:in call' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:410:in_run_call_callbacks'
/home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:in send' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:inrun_callbacks'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/callbacks.rb:44:in call' rack (1.1.0) lib/rack/sendfile.rb:105:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/remote_ip.rb:48:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/show_exceptions.rb:48:incall'
/home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/rack/logger.rb:13:in call' rack (1.1.0) lib/rack/runtime.rb:17:incall'
rack (1.1.0) lib/rack/lock.rb:11:in call' rack (1.1.0) lib/rack/lock.rb:11:insynchronize'
rack (1.1.0) lib/rack/lock.rb:11:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/static.rb:30:incall'
/home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/application.rb:132:in call' /home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/application.rb:81:insend'
/home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/application.rb:81:in method_missing' /home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/rack/log_tailer.rb:15:incall'
rack (1.1.0) lib/rack/content_length.rb:13:in call' rack (1.1.0) lib/rack/handler/webrick.rb:48:inservice'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun'
/usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:instart'
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart'
/usr/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/lib/ruby/1.8/webrick/server.rb:92:instart'
/usr/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/lib/ruby/1.8/webrick/server.rb:82:instart'
rack (1.1.0) lib/rack/handler/webrick.rb:14:in run' rack (1.1.0) lib/rack/server.rb:155:instart'
/home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/commands/server.rb:62:in start' /home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/commands.rb:42 script/rails:9:inrequire'
script/rails:9

/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/request_forgery_protection.rb:125:in verify_authenticity_token' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:439:in_run__1010667671__process_action__1623385099__callbacks'
/home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:404:in send' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:404:in_run_process_action_callbacks'
/home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:in send' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:inrun_callbacks'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/abstract_controller/callbacks.rb:17:in process_action' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/rescue.rb:8:inprocess_action'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/abstract_controller/base.rb:123:in process' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/abstract_controller/rendering.rb:39:inprocess'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal.rb:84:in dispatch' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal/rack_delegation.rb:14:indispatch'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_controller/metal.rb:124
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:29:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:29:incall'
rack-mount (0.6.3) lib/rack/mount/route_set.rb:148:in call' rack-mount (0.6.3) lib/rack/mount/code_generation.rb:89:inrecognize'
rack-mount (0.6.3) lib/rack/mount/code_generation.rb:73:in optimized_each' rack-mount (0.6.3) lib/rack/mount/code_generation.rb:88:inrecognize'
rack-mount (0.6.3) lib/rack/mount/route_set.rb:139:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/routing/route_set.rb:458:incall'
warden (0.10.3) lib/warden/manager.rb:35:in call' warden (0.10.3) lib/warden/manager.rb:34:incatch'
warden (0.10.3) lib/warden/manager.rb:34:in call' /home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:31:incall'
/home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/connection_adapters/abstract/query_cache.rb:35:in cache' /home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:11:incache'
/home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/query_cache.rb:30:in call' /home/grigio/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta3/lib/active_record/connection_adapters/abstract/connection_pool.rb:365:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/head.rb:14:in call' rack (1.1.0) lib/rack/methodoverride.rb:24:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/params_parser.rb:19:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/flash.rb:167:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/session/cookie_store.rb:107:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/cookies.rb:202:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/callbacks.rb:46:in call' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:410:in_run_call_callbacks'
/home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:in send' /home/grigio/.bundle/ruby/1.8/gems/activesupport-3.0.0.beta3/lib/active_support/callbacks.rb:88:inrun_callbacks'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/callbacks.rb:44:in call' rack (1.1.0) lib/rack/sendfile.rb:105:incall'
/home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/remote_ip.rb:48:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/show_exceptions.rb:48:incall'
/home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/rack/logger.rb:13:in call' rack (1.1.0) lib/rack/runtime.rb:17:incall'
rack (1.1.0) lib/rack/lock.rb:11:in call' rack (1.1.0) lib/rack/lock.rb:11:insynchronize'
rack (1.1.0) lib/rack/lock.rb:11:in call' /home/grigio/.bundle/ruby/1.8/gems/actionpack-3.0.0.beta3/lib/action_dispatch/middleware/static.rb:30:incall'
/home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/application.rb:132:in call' /home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/application.rb:81:insend'
/home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/application.rb:81:in method_missing' /home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/rack/log_tailer.rb:15:incall'
rack (1.1.0) lib/rack/content_length.rb:13:in call' rack (1.1.0) lib/rack/handler/webrick.rb:48:inservice'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun'
/usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:instart'
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart'
/usr/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/lib/ruby/1.8/webrick/server.rb:92:instart'
/usr/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/lib/ruby/1.8/webrick/server.rb:82:instart'
rack (1.1.0) lib/rack/handler/webrick.rb:14:in run' rack (1.1.0) lib/rack/server.rb:155:instart'
/home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/commands/server.rb:62:in start' /home/grigio/.bundle/ruby/1.8/gems/railties-3.0.0.beta3/lib/rails/commands.rb:42 script/rails:9:inrequire'
script/rails:9

Request

Parameters:

{"token"=>"8313f091c9302dc351d7f4d37d281a2623c0945c",
"authenticity_token"=>"hZ2hsI qu0t1NpfQBZeeqDEDeQIvIQzxCvlRSz8Mwmk="}

twitter not save email

Ok, i tried with twitter sign but the email is saved blank... i need some help please

Violate validations

This seems to create the user regardless of whether the user violates any validations. Is this by design?

I am using Mongoid, so that's a possible cause of the issue.

It might be nice to have a callback you could use for successful or unsuccessful creation of the user, if there is a good access point for that.

The edit has a password field mandatory

Would it be possible to create a new edit view where it does not show the password fields and does not check for a password to validate the changes?

I am doing that in my app, but this is just a suggestion for this module

Storing additional user data in devise user model

I've setup a user model with devise and then added this gem to my project. The instructions said that I needed to add "rpx_identifier" to the users table. Although do I need to add any additional columns to my table to store additional user data from RPX?

For example if I'm trying to get displayName would I need to add a "display_name" column to my user model? Any help would be greatly appreciated, thanks for the awesome plugin!

Not able to login through facebook and google using same email

Thanks for the gem. It works nicely except in one scenario.

In my app email address is key so I have setup such that email must be provided.

I first login through facebook with email [email protected] . So now I have a record in the database for john. I use before_rpx_auto_create hook.

Now if I login through google.com using the same email address [email protected] then even though the rpx box says I am loggin through google.com the signed_in? method of devise returns false.

Any thoughts on this issue.

Thanks

Sign in with email used as rpx log in raises error

Scenario:

  • I login with email1 on facebook via rpx
  • I logout
  • I signin with email1 via a normal signin form (using devise)
    => salt is empty => BCrypt::Errors::InvalidSalt in Devise/sessionsController#create

Not loading at first?

When I first start the server and login with a social account I get "Invalid email/password", but on the second time it will get passed to the rpx connectible. Is anyone else having this problem? Rails 3.0.0

weird testing issue

I'm using devise_rpx_connectable on a project, and I'm having a weird problem in testing. I'm using devise 1.1.3, devise_rpx_connectable 0.2.2.

Without :rpx_connectable on the model's devise strategies, everything works fine (i.e. using :database_authenticatable). once I integrate devise_rpx_connectable, however, the logged in user from rpx is not being remembered between redirects (i.e. user_signed_in? == false && current_user == nil)

I'm simulating the janrain engage service by skipping ahead to the callback and POSTing the token to my app, then mocking out the RPXNow.user_data call to return the appropriate identifier for the user. Stepping through it in the debugger it all works fine, until it gets to the redirect. Once I make it back into my controller through the redirect, warden isn't seeing the session user anymore.

I should note that it works fine in the development envronment. After it comes back from the engage server, it authenticates and the user_signed_in? and current_user helpers work as expected.

Am I missing something here? If there's a more appropriate forum please direct me to it.

Before hooks not allowing registration or login

I'm trying to save the givenName and familyName for a user authenticating through google.

In my user model, for both the before_rpx_auto_create and before_rpx_success, i've tried the following combinations:

self.first_name = rpx_user.name.givenName

self.first_name = rpx_user.name.given_name

self.first_name = rpx_user[:name][:givenName]

But neither one of them saves the givenName field and doesn't allow devise to proceed with registration or login...

Any help will be appreciated. Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.