Sha256: f82a1ca1eb56546f58b8bcb4a922285f9fc6c145a768b1f9c2d8734b6df2e41a
Contents?: true
Size: 714 Bytes
Versions: 10
Compression:
Stored size: 714 Bytes
Contents
class WCC::Auth::Devise::WatermarkCallbacksController < Devise::OmniauthCallbacksController skip_authorization_check if respond_to?(:skip_authorization_check) def watermark oauth_data = request.env["omniauth.auth"] @user = User.initialize_from_watermark_oauth(oauth_data) @user.save sign_in_and_redirect @user end def failure Rails.logger.error failed_strategy.name Rails.logger.error failure_message set_flash_message :alert, :failure, :kind => OmniAuth::Utils.camelize(failed_strategy.name), :reason => failure_message redirect_to after_omniauth_failure_path_for(resource_name) end protected def after_omniauth_failure_path_for(scope) root_path end end
Version data entries
10 entries across 10 versions & 1 rubygems