Dealing with Oauth 2.0-facebook gem error 100: This authorization code has been used

前端 未结 6 1584
囚心锁ツ
囚心锁ツ 2021-02-07 05:44

I have been working on setting up facebook authentication for my rails app and while testing, after logging-in with my facebook account, I keep getting this error:



        
6条回答
  •  眼角桃花
    2021-02-07 06:42

    I was incorrectly initializing OmniAuth twice, calling config/initializers/omniauth.rb twice.

    This would add OmniAuth::Builder twice to the middleware stack. With recent Facebook changes, this started failing with error 100.

    Making sure OmniAuth::Builder got added once I managed to solve this issue.

    To double check your middleware stack, run this:

    rake middleware
    

提交回复
热议问题