undefined local variable or method `flash' for #<Devise::OmniauthCallbacksController:0x007fb5d1741e48>
问题 I am building a Rails-API using Omniauth-facebook and Devise-token-auth with Angular and ng-token-auth for the frontend. However when logging in with facebook I am presented with the error: undefined local variable or method `flash' for #<Devise::OmniauthCallbacksController:0x007fd027a51e10> It seems omniauth automatically uses flash middleware however the rails-api doesn't include this and I have been unsuccessfully disabling the use of flash with omniauth. My configuration is as below: