Sha256: 93671d01dc6b0a7123e9b80fb2e219a3ec53bfd580798b8c3117d0c3ea6cb704

Contents?: true

Size: 490 Bytes

Versions: 13

Compression:

Stored size: 490 Bytes

Contents

module Omniauth
  module Social::Callbacks
    def google_oauth2
      signin_and_redirect
    end
  
    def facebook
      signin_and_redirect
    end
  
    def twitter
      signin_and_redirect
    end
  
    private
  
    def signin_and_redirect
      Social::Service.new(request, self).execute do |success, failure| 
        success.call { redirect_to root_path, notice: t('.notice') }
        failure.call { redirect_to root_path, alert: t('.alert') }
      end
    end
  end  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
omniauth-social-0.2.4 lib/omniauth/social/callbacks.rb
omniauth-social-0.2.3 lib/omniauth/social/callbacks.rb
omniauth-social-0.2.2 lib/omniauth/social/callbacks.rb
omniauth-social-0.2.1 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.9 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.8 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.7 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.6 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.5 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.4 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.3 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.2 lib/omniauth/social/callbacks.rb
omniauth-social-0.1.1 lib/omniauth/social/callbacks.rb