Coder Social home page Coder Social logo

authlogic-password-reset-tutorial's People

Contributors

deathwishdave avatar rejeep 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

Watchers

 avatar  avatar  avatar  avatar

authlogic-password-reset-tutorial's Issues

Incompatibility with ruby 1.9.2

Constructions like this

request_new = lambda do
  get :new
end

cannot be passed as a block to instance_eval on ruby 1.9.2, otherwise "ArgumentError: wrong number of arguments (1 for 0)" is raised.

This can be fixed by replacing 'lambda" with 'proc'.

Adam Tretkowski
ruby -v
ruby 1.9.2dev (2010-06-25 revision 28427) [i686-linux]

Auto logging in after resetting pw

Everything works great, but when goto the link and reset the password, I'm now logged in as that user. I like that it's doing that, but I'm a bit concerned why and where it's doing that. I can't seem to track it down.

Any ideas? It seems to happen after I save and forward the user in the update action.

ERB new view doesn't display form

I think you are missing an '=' in the form_tag... should be

<%= form_tag password_resets_path do %>

not

<% form_tag password_resets_path do %>

At least that's what works for me.

Not updating password

It isn't updating the password.
Everything works except the update of password.
It sends an email with the url. Here's go the log from the console:
Any help?

Processing PasswordResetsController#update (for 127.0.0.1 at 2010-08-23 11:04:05) [PUT]
  Parameters: {"commit"=>"Atualizar", "action"=>"update", "_method"=>"put", "authenticity_token"=>"PM0h4a4wwqRp+VMMcnGIzvMf9tV9bPS5mtcMZwCwQWI=", "id"=>"6WBLhSGcdmenvdZyZND", "controller"=>"password_resets", "password"=>"[FILTERED]"}
  User Columns (7.5ms)   SHOW FIELDS FROM `users`
  User Load (2.1ms)   SELECT * FROM `users` WHERE (perishable_token = '6WBLhSGcdmenvdZyZND' and updated_at > '2010-08-23 13:54:05') LIMIT 1
  SQL (0.8ms)   BEGIN
  User Load (2.3ms)   SELECT `users`.id FROM `users` WHERE (`users`.`persistence_token` = BINARY 'b6371f37efeb7242514382445198d8558d222d09e29b2eee336b0487d9ec75fc97b669a11228d66359a4097af258cb493ad2e1594c8b845b941c25b4542bb1e4' AND `users`.id <> 3) LIMIT 1
  User Load (0.9ms)   SELECT `users`.id FROM `users` WHERE (`users`.`login` = BINARY 'joba' AND `users`.id <> 3) LIMIT 1
  User Load (1.8ms)   SELECT `users`.id FROM `users` WHERE (`users`.`email` = BINARY '[email protected]' AND `users`.id <> 3) LIMIT 1
  SQL (2.0ms)   ROLLBACK
Rendering template within layouts/application
Rendering password_resets/edit
Rendered layouts/_header (18.8ms)
Completed in 123ms (View: 27, DB: 18) | 200 OK [http://localhost/senha/6WBLhSGcdmenvdZyZND]

Notifier method name

Hi, in User model it is described that we add:
Notifier.deliver_password_reset_instructions(self)

However, the method in Notifier is described as:

def password_reset_instructions(user)

missing the deliver word.

Should be on User:

Notifier.password_reset_instructions(self).deliver_now

find_by_email is case sensitive

Hi

Just ran into this issue with my own project. Authlogic also does this when looking up an email for login purposes, so we need to do the same on reset:

email = params[:email] 
@user = User.where("LOWER(email) = ?", email).first

Otherwise [email protected] will not match [email protected] when doing a reset, even though it does match when doing login / registration duplication check.

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.