Skip to content

Commit

Permalink
Add LinkedIn (#12904)
Browse files Browse the repository at this point in the history
  • Loading branch information
pragatimodi authored May 9, 2024
1 parent c24966d commit 15eda2f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "linkedin-logo.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enum AuthMenu: String {
case microsoft = "microsoft.com"
case gitHub = "github.com"
case yahoo = "yahoo.com"
case linkedIn = "linkedin.com"
case facebook = "facebook.com"
case gameCenter = "gc.apple.com"
case emailPassword = "password"
Expand Down Expand Up @@ -72,6 +73,8 @@ enum AuthMenu: String {
return "GitHub"
case .yahoo:
return "Yahoo"
case .linkedIn:
return "LinkedIn"
case .facebook:
return "Facebook"
case .gameCenter:
Expand Down Expand Up @@ -154,6 +157,8 @@ enum AuthMenu: String {
self = .gitHub
case "Yahoo":
self = .yahoo
case "LinkedIn":
self = .linkedIn
case "Facebook":
self = .facebook
case "Game Center":
Expand Down Expand Up @@ -250,7 +255,7 @@ enum ActionCodeRequestType: String {

class AuthMenuData: DataSourceProvidable {
private static var providers: [AuthMenu] {
[.google, .apple, .twitter, .microsoft, .gitHub, .yahoo, .facebook, .gameCenter]
[.google, .apple, .twitter, .microsoft, .gitHub, .yahoo, .linkedIn, .facebook, .gameCenter]
}

static var settingsSection: Section {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class AccountLinkingViewController: UIViewController, DataSourceProviderDelegate
case .facebook:
performFacebookAccountLink()

case .twitter, .microsoft, .gitHub, .yahoo:
case .twitter, .microsoft, .gitHub, .yahoo, .linkedIn:
performOAuthAccountLink(for: provider)

case .gameCenter:
Expand Down Expand Up @@ -204,7 +204,7 @@ class AccountLinkingViewController: UIViewController, DataSourceProviderDelegate
}
}

// MARK: - Twitter, Microsoft, GitHub, Yahoo Account Linking 🔥
// MARK: - Twitter, Microsoft, GitHub, Yahoo, LinkedIn Account Linking 🔥

// Maintain a strong reference to an OAuthProvider for login
private var oauthProvider: OAuthProvider!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class AuthViewController: UIViewController, DataSourceProviderDelegate {
case .facebook:
performFacebookSignInFlow()

case .twitter, .microsoft, .gitHub, .yahoo:
case .twitter, .microsoft, .gitHub, .yahoo, .linkedIn:
performOAuthLoginFlow(for: provider)

case .gameCenter:
Expand Down

0 comments on commit 15eda2f

Please sign in to comment.