module SocialAuth

Constants

VERSION

Public Class Methods

authenticate(type, auth_token) click to toggle source
# File lib/social_auth.rb, line 35
def self.authenticate(type, auth_token)
  case type.camelize
  when "Facebook"
    FacebookService.init_with(auth_token)
  when "Twitter"
    TwitterService.init_with(auth_token)
  when "GooglePlus"
    GooglePlusService.init_with(auth_token)
  end
end
connect(user, type, auth_token, method="Connected") click to toggle source
# File lib/social_auth.rb, line 46
def self.connect(user, type, auth_token, method="Connected")
  case type.camelize
  when "Facebook"
    FacebookService.connect_with(user, auth_token, method)
  when "Twitter"
    TwitterService.connect_with(user, auth_token, method)
  when "GooglePlus"
    GooglePlusService.connect_with(user, auth_token, method)
  end
end
disconnect(user, type) click to toggle source
# File lib/social_auth.rb, line 57
def self.disconnect(user, type)
  case type.camelize
  when "Facebook"
    FacebookService.disconnect_user(user)
  when "Twitter"
    TwitterService.disconnect_user(user)
  when "GooglePlus"
    GooglePlusService.disconnect_user(user)
  end
end
setup() { |self| ... } click to toggle source

Used to set up Social Login from the initializer.

# File lib/social_auth.rb, line 31
def self.setup
  yield self
end