0

I've implemented omniauth to enable github login on the Rails app I'm working on.

I'm using Devise for login/authentication.

The omniauth implementation works locally, with client_id and client_secret set as .env variables. They're passed to devise via config/initializers/devise.rb:

config.omniauth :github, ENV['GITHUB_CLIENT_KEY'], ENV['GITHUB_CLIENT_SECRET'], scope: 'user:email'

When I push up to my production server (Heroku), I set config variables there and change the Homepage URL and Authorization callback URL on github for the oauth app I've created there.

Then I get a 404 from GitHub whenever I tried to login/sign up as a user using GitHub auth.

I've tried a bunch of different url variants (with/without trailing slashes) in GitHub for the oauth app. I've also inspected the keys in Heroku to make sure they're properly stored and accessed there.

Sam Nixon
  • 1
  • 3

0 Answers0