Followed the setup documentation verbatim
In the gemfile
gem 'omniauth'
gem 'omniauthgithub'
gem 'dotenv-rails'
In config/initializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do
provider :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_CLIENT_SECRET']
end
And the link for the user
<%= link_to "Log in with GitHub!", "/auth/github" %>
The call back route is set as well
get '/auth/:provider/callback' => 'sessions#create'
But it doesn't get that far. When I click on the link there is an immediate routing error
No route matches [GET] "/auth/github"
Everything I can find indicates the initial "/auth/:provider" request is intercepted with the Omniauth black-box magic and that all I should have to do is configure the callback route. I've tried this entire setup with Facebook as well just to see if it was something Github specific but no luck. I've wiped the Gemfile.lock and re-ran bundle install just to make sure the gems are all in working order but that didn't change anything. All the other omniauth issues I've found articles about were regarding the callback routing, not the initial get request- which leads me to believe it's either something extremely obvious or very obscure. Please Help!