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

login callback should not be called at startup #2

@thbar

Description

@thbar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions