我正在尝试遵循 Railscast 241 Simple OmniAuth 并且它工作正常,除非我在末尾有 Route Globbing /config/routes.rb
:
match '*uri' => "posts#index"
如果我/auth/twitter
使用 globbing 请求,那么 OmniAuth 什么也不做:
Started GET "/auth/twitter" for 127.0.0.1 at 2011-04-03 19:17:44 +0200
Processing by PostsController#index as HTML
Parameters: {"uri"=>"auth/twitter"}
Rendered posts/index.html.haml within layouts/application (9.0ms)
Completed 200 OK in 103ms (Views: 14.6ms | ActiveRecord: 0.7ms)
如果没有 globbing 路由,它会正确地进行身份验证。
有没有办法同时拥有路由 globbing 和 OmniAuth?