Class: UserService

Inherits:
Object
  • Object
show all
Defined in:
app/services/user_service.rb

Overview

app/services/user_service.rb Handles information extraction from OAuth.

Class Method Summary collapse

Class Method Details

.fetch_connected_auths(user) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/services/user_service.rb', line 4

def self.fetch_connected_auths(user)
    # Dictionary to hold all connected auths
    auths = {}
    if user.github_username
        auths["github"] = user.github_username
    end
    if user.spotify_username
        auths["spotify"] = user.spotify_username
    end
    if user.email
        auths["email"] = user.email
    end
    auths
end