Git Product home page Git Product logo

authlogic_example's People

Contributors

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

authlogic_example's Issues

Logout does not log out user with cookie

In the example app, you have the destroy method in the user_sessions controller. However, this method does not delete the cookie set if the user clicks "Remember me".

Therefore the user could click a logout link and think they're safely out of the application. Meanwhile, someone else could come along and get right back into the secure areas of the application and view the first user's data.

recovery password: not safety

if we start using it as you described, then anybody can start checking urls like "http://example.com/password_resets/zAk3O7mRnjTdPfaLkePU/edit" and if you have many users on your system then it is more possible to find url for changing pass to somebody else.

The simplest solution: add required field 'email' to app/views/password_resets/edit.html.erb and check it before changing.
Or better add ?email=[email protected] to link in email. And check for it in load_user_using_perishable_token

Undefined method to_key

I keep getting the following error in my login form:

NoMethodError in User_sessions#new

Showing /Users/alvincrespo/Sites/lajobr/app/views/user_sessions/_form.html.erb where line #1 raised:

undefined method `to_key' for #<UserSession: no credentials provided>

Extracted source (around line #1):

1: <%= form_for @user_session do |f| %>
2: <%= f.error_messages %>
3:
4:

I'm not sure what the issue may be. Any help would be great! Thanks!

Following the Tutorial was not going smoothly

# config/environment.rb
config.gem "authlogic"

got this error:

undefined local variable or method "config" for main:Object

script/generate session user_session

Got this error:

Could not find generator 'session'. Maybe you meant 'assets' or 'helper' or 'task'

is there any special requirement for this Tutorial ?

And script/generate is not in my environment, I used rails g instead.
Is that correct?

Better error messages when fields missing on user model

I have implemented authlogic 2 or 3 times but always hit a sticky patch which turns out to be due a field missing on the model:

undefined method login?' - You missed your crypted password field on user model undefined methodlogged_out?' - You potentially are trying to use logout_on_timeout option which depends on last_request_at

I had to dig through source code to work out the second of those.

Explcit check for these messages and a suggestion message would really help on this.

ActionView::TemplateError (undefined method `username'

I followed this example exactly and keep getting template error undefined method for login, username etc. someone else had this problem on another site and added login_field :login to the user_session.rb
yet in your example you dont have to do this.

no show action in controller

ActionView::Template::Error (No route matches {:controller=>"user_session", :action=>"show"}):

Seems from viewing the controller, there is no "show" method.

RPX_APP_NAME problem

I'm on ubuntu 9.10
after
export RPX_API_KEY='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
export RPX_APP_NAME='my-little-app'
I couldn't login with my google account. But changing RPX_APP_NAME to ENV['RPX_APP_NAME'] in the calls to rpx_popup and rpx_embed in the views they are used fixed the problem.

resolving issue with dom_id and Rails 3

The setup tutorial leads to an error when form_for makes a call to dom_id with the user_session object, as dom_id in Rails 3 expects the object to define "to_key()"

in Authlogic::Session::ActiveRecordTrickery::InstanceMethods there is this:

# For rails >= 3.0
def to_model
  self
end

...and adding a definition of to_key for the same motivation seems to solve the issue:

module Authlogic::Session::ActiveRecordTrickery::InstanceMethods
  def to_key
    nil
  end
end

Migrations are broken

Make a fresh clone of this app, add a database.yml, run migrations, run the tests...oh, they expect email to be defined.

It's a poor example if it doesn't work, Ben. ;-)

Rails 2.1.2 App, Current Rails Version is 3.1.3

I appreciate you writing this example for authlogic, but it is severely outdated. So much so, that it does not guide our use of authlogic in Rails 3. Please update! I'm having awful issues with my rails app due to authlogic. It's incredibly frustrating!

why did you remove the email field?

I removed the email field and now I cannot register a new user. I am guessing that acts_as_authentic by default includes email authentication....? But can't figure out how it works without it...

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.