# "Authentication failure! csrf\_detected: OmniAuth::Strategies::OAuth2::CallbackError" Error due to missing session\["omniauth.state"\]

**URL:** <https://meta.discourse.org/t/authentication-failure-csrf-detected-omniauth-callbackerror-error-due-to-missing-session-omniauth-state/153222>\
**Category:** SSO\
**Tags:** unsupported-install\
**Created:** [May 29, 2020, 12:32pm UTC](https://meta.discourse.org/t/authentication-failure-csrf-detected-omniauth-callbackerror-error-due-to-missing-session-omniauth-state/153222 "2020-05-29T12:32:09Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Arvind\_Hebbal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arvind_hebbal/32/143497_2.png) [@Arvind\_Hebbal](https://meta.discourse.org/u/Arvind_Hebbal)\
**Post date:** [May 29, 2020, 2:48pm UTC](https://meta.discourse.org/t/authentication-failure-csrf-detected-omniauth-callbackerror-error-due-to-missing-session-omniauth-state/153222/5 "2020-05-29T14:48:16Z")

</div>

Hello @david we are hoisting discourse using docker containers. The docker file which we are using is [discourse\_docker/image/base at master · discourse/discourse\_docker · GitHub](https://github.com/discourse/discourse_docker/tree/master/image/base). Since there is no script to start discourse inside docker container we have added a small start script which pre compiles and starts discourse.  
RAILS\_ENV=production bundle exec rake db:migrate  
RAILS\_ENV=production bundle exec rake assets:precompile  
RAILS\_ENV=production bundle exec rails server --binding=0.0.0.0

---

_[View the full topic](https://meta.discourse.org/t/authentication-failure-csrf-detected-omniauth-callbackerror-error-due-to-missing-session-omniauth-state/153222)._
