Syler Ruby
Syler Ruby

Reputation: 57

Rails 4 OnmiAuth routing error?

I followed Railscast episode 241, which works great with a Twitter login.

In episode 304, for OmniAuth Identity, I followed everything to the letter. This occurs after I filled in the details for a new user:

No route matches [POST] "/auth/identity/callback"

My routes.rb:

root "home#index"
get "/auth/:provider/callback" => "sessions#create"
get "/signout" => "sessions#destroy", :as => :signout

Is it because I'm using Rails 4?

Upvotes: 1

Views: 163

Answers (1)

Ron
Ron

Reputation: 61

Your routes specify only GETs, but the request from omniauth-identity is a POST. Try adding a POST route to '/auth/:provider/callback'.

Upvotes: 2

Related Questions