How to rescue OmniAuth::Strategies::OAuth2::CallbackError?

后端 未结 4 457
名媛妹妹
名媛妹妹 2021-01-30 13:23

I am building a Rails application with Omniauth for log in service.To authenticate Google I am using OmniAuth Google OAuth2 Strategy.

When user clicks \'allow access\' b

4条回答
  •  盖世英雄少女心
    2021-01-30 13:40

    You can set the on_failure proc in the omniauth initializer in an even cleaner fashion:

    OmniAuth.config.on_failure = UsersController.action(:oauth_failure)
    

提交回复
热议问题