Giter VIP home page Giter VIP logo

authlogic_openid's People

Contributors

binarylogic avatar pelle 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  avatar

authlogic_openid's Issues

App Timeout

Does OpenID have a session expiration on it? I'm finding in a sample app built on this gem that inactivity for 10 or 20 minutes logs me out.

Thanks!

[feature] merge registration and login

Hi. It would be very nice if it was possible to merge the login and registration together. Example:

As a user who never used the website.
When I login with openid.
The user is automatically created.

This way, I don't have a registration phase. The user simple logins, and if it doesn't exist yet on the database, the user is created.

I tried to play with the existing code to implement this behavior with no success. Does it make sense?

Password-less registration

It seems quite complicated to make login (using auto_register) work without forcing user to enter a password. I won't do any hacks as of not validating/requiring password fields, since those are still needed with old school login/password registration/login.

What would I expect is that authlogic_openid let me register users without password and login/username/email

Gem of new version and small issue when using in test/console..

Can this Github repos be turned into gem? Now I only seem to find the 1.0.4 version :(

Also I get a 'nil.params?' error when using in console / test.
Please see below for fix:

# This fixes the following error:
#  You have a nil object when you didn't expect it!
#  The error occurred while evaluating nil.params
module AuthlogicOpenid
  module ActsAsAuthentic
    module Methods

      def openid_complete?
        session_class.controller && session_class.controller.params[:open_id_complete] && session_class.controller.params[:for_model]
      end

    end
  end
end

Missing template user_sessions/create.erb in view path app/views

authlogic v2.0.13 and authlogic-oid v1.0.4

When I submit an invalid open id to a new session ("goodopenid.com" in my case) I get the following error:

Missing template user_sessions/create.erb in view path app/views

Here's my user_sessions_controller create method (copied from examples)

def create
@user_session = UserSession.new(params[:user_session])
# We are saving with a block to accomodate for OpenID authentication
# If you are not using OpenID you can save without a block:
#
# if @user_session.save
# # ... successful login
# else
# # ... unsuccessful login
# end
@user_session.save do |result|
if result
flash[:notice] = "Login successful!"
redirect_back_or_default root_path
else
render :action => :new
end
end
end

For some reason its attempting to render "create" rather than rendering "new" with errors.

Incidentally, I see the same problem in the sample app here:

http://authlogicexample.binarylogic.com/

There, when I use "goodopenid.com" I get a crash.

Ideas?

uninitialized constant Rack::OpenID

So I followed the railscast tutorial and used the old version of the plugin from Ryan's git file. I can now successfuly create/register a user using OpenID (Google), but I cannot log in with this user. When I submit the OpenID that has been registered, I get "uninitialized constant Rack::OpenID". Any ideas?

Thanks!

Doc needs: How to save @user correctly

Hi there,

I need help writing the create() method in the users_controller.

So perhaps this could label this as a "documentation bug".

Anyway, in my users controller, I wrote this:

def create
@user = User.new(params[:user])
debugger
@user.save do |result|
if result
flash[:notice] = "Account registered!"
redirect_back_or_default account_url
else
render :action => :new
end
end
end

When control hits

@user.save do |result|

control transfers to this file:

http://github.com/binarylogic/authlogic_openid/blob/master/lib/authlogic_openid/acts_as_authentic.rb

then to this line:

def save(perform_validation = true, &block)
return false if perform_validation && block_given? && authenticate_with_openid? && !authenticate_with_openid

Once here, the debugger is telling me that block_given? is false.

This is wrong.

block_given? should be true.

So, perhaps I wrote create() incorrectly?

The doc only gives syntax for the saving of UserSession objects.

Please offer clues.

Thanks,
--Audrey

Session is a reserved word in oracle

Is there a way to alter the table name used?
Or can the code be changed to quote the session table?

ActiveRecord::StatementInvalid (OCIError: ORA-00903:
invalid table name: SELECT data FROM session WHERE id = 3 FOR UPDATE)

ActionView::Template::Error ("DESC session" failed; does it exist?)

Thanks,

possible "remember_me" typo in validate_by_openid method

In the validate_by_openid method, you're setting the variable "self.remember_me", while a few lines below, you're using "remember_me?" (notice the question mark).

I'm not completely sure if this is a typo/bug, but it looks like it. Sorry if I'm wrong.

last update on open_id_authentication plugin breaks authlogic_openid

Hi,
since open_id_authentication is now build on top of Rack::OpenID, the gem is not working anymore.

Here the changes i found for now.

the exception class OpenIdAuthentication::InvalidOpenId was removed as well as the method OpenIdAuthentification.normalize_identifier

These are use in

file lib/authlogic_openid/acts_as_authentic.rb, line 55

  def openid_identifier=(value)
    write_attribute(:openid_identifier, value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value))
    reset_persistence_token if openid_identifier_changed?
  rescue OpenIdAuthentication::InvalidOpenId => e
    @openid_error = e.message
  end

File lib/authlogic_openid/session.rb, line 50

  def openid_identifier=(value)
    @openid_identifier = value.blank? ? nil : OpenIdAuthentication.normalize_identifier(value)
    @openid_error = nil
  rescue OpenIdAuthentication::InvalidOpenId => e
    @openid_identifier = nil
    @openid_error = e.message
  end

Use of config() instead of rw_config() in authlogic_openid 1.0.3 with authlogic >= 2.0.12

Authlogic-Changelog for 2.0.12 released 2009-5-13 reads:
Changed config() convenience method to rw_config() to be more descriptive and less vague.

...but methods 'required_fields' and 'optional_fields' in 'lib/authlogic_openid/acts_as_authentic.rb' still use config().

This results in a NoMethodError for people using authlogic-openid in combination with authlogic >= 2.0.12.

Exception uninitialized constant OpenIdAuthentication::InvalidOpenId uninitialized

On a new project, while trying to setup Authlogic and Authlogic OpenId I constantly run into that exception, which in turn unables me to create users / login users.

I'm using Rails 2.3.5 with the following gems:

config.gem 'authlogic', :version => '2.1.3'
config.gem 'rack-openid', :version => '0.2.2', :lib => 'rack/openid'
config.gem 'ruby-openid', :version => '2.1.7', :lib => 'openid'
config.gem 'authlogic-oid', :version => '1.0.4', :lib => 'authlogic_openid'

I'm also using the latest version of rails/open_id_authentication plugin.

Anyone could provide me with some assistance / guide me in the right direction on how to tackle this problem?

Best regards,
DBA

validation option ":if" is ignored

For the validates_length_of_password_field_options, validates_confirmation_of_password_field_options, and validates_length_of_password_confirmation_field_options the :if option is ignored. It appears that a merge is executed against the options hash, overwriting the :if option. Can we change this to a reverse_merge? http://gist.github.com/251422

(I wanted to run this against the test suite but I couldn't get the suite to pass regardless of this patch's presence)

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.