You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/app/decorators/omni_auth_credentials.rb

22 lines
308 B
Ruby

class OmniAuthCredentials
attr_reader :omniauth_hash
def initialize(omniauth_hash)
@omniauth_hash = omniauth_hash
end
def provider
omniauth_hash['provider']
end
def uid
omniauth_hash['uid']
end
def email
omniauth_hash['info'] && omniauth_hash['info']['email']
end
end