1. These are my gems.
gem 'devise'
gem 'omniauth-facebook','~> 4.0'

  1. This is the code I have in my devise.rb
config.omniauth :facebook, ENV['FACEBOOK_APPLICATION_ID'], ENV['FACEBOOK_APPLICATION_SECRET'], scope: 'public_profile,email'
  1. This is my .env
export FACEBOOK_APPLICATION_ID=<appid>
export FACEBOOK_APPLICATION_SECRET=<appsecret>                                                                   
  1. I also tried removing the export from the above statements.
FACEBOOK_APPLICATION_ID=<appid>
FACEBOOK_APPLICATION_SECRET=<appsecret>                                                                   
  1. This is my Facebook application settings.
![Facebook app settings](https://i.stack.imgur.com/AM8cW.png)
  1. The same thing works on x branch of my project but the same credentials does not work on the branch y of my git project.

  2. This is the error I get.

Invalid app ID
The provided app ID does not look like a valid app ID.
1

There are 1 best solutions below

0
On

While merging my branch with another it took another branch's omniauth.rb file in the config folder which I think internally overwrote devise.rb and hence did not work. It was a very very silly error from my end. Thankyou to everyone who answered.