Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

login callback should not be called at startup #2

Open
thbar opened this issue Feb 5, 2010 · 0 comments
Open

login callback should not be called at startup #2

thbar opened this issue Feb 5, 2010 · 0 comments

Comments

@thbar
Copy link

thbar commented Feb 5, 2010

Not a big deal but it took me a bit of time to understand what was happening, so I'll document it here. Maybe there's a clever workaround to imagine; my current work-around is just to always use the ":login =>" form instead of the do xxx form.

When defining the login callback like this:

use Chowder::OpenID do |url|
user = User.first(:openid => url) and user.id
end

Sinatra 0.9.4 base.rb (line 359) does:

  yield self if block_given?

So the login callback is called mistakingly, with Chowder::OpenId as a param.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant