   }
 
   static var providerSection: Section {
-    let providers = self.providers.map { Item(title: $0.rawValue) }
+    let providers = self.providers.map { Item(title: $0.name) }
     let header = "Identity Providers"
     let footer = "Choose a login flow from one of the identity providers above."
     return Section(headerDescription: header, footerDescription: footer, items: providers)

    let shieldSymbol = UIImage.systemImage("lock.shield.fill", tintColor: .systemOrange)

    let otherOptions = [
      Item(title: passwordless.rawValue, image: lockSymbol),
      Item(title: phoneNumber.rawValue, image: phoneSymbol),
      Item(title: anonymous.rawValue, image: anonSymbol),
      Item(title: custom.rawValue, image: shieldSymbol),
    ]
    return Section(footerDescription: "Other authentication methods.", items: otherOptions)
  }


/// Firebase Auth supported identity providers and other methods of authentication
enum AuthProvider: String {
  case google = "google.com"
  case apple = "apple.com"
  case twitter = "twitter.com"
  case microsoft = "microsoft.com"
  case gitHub = "github.com"
  case yahoo = "yahoo.com"
  case facebook = "facebook.com"
  case emailPassword = "password"
  case passwordless = "emailLink"
  case phoneNumber = "phone"
  case anonymous = "anonymous"
  case custom = "custom"
  
  /// More intuitively named getter for `rawValue`.
  var id: String { self.rawValue }
  
  /// The UI friendly name of the `AuthProvider`. Used for display.
  var name: String {
    switch self {
    case .google:
      return "Google"
    case .apple:
      return "Apple"
    case .twitter:
      return "Twitter"
    case .microsoft:
      return "Microsoft"
    case .gitHub:
      return "GitHub"
    case .yahoo:
      return "Yahoo"
    case .facebook:
      return "Facebook"
    case .emailPassword:
      return "Email & Password Login"
    case .passwordless:
      return "Email Link/Passwordless"
    case .phoneNumber:
      return "Phone Number"
    case .anonymous:
      return "Anonymous Authentication"
    case .custom:
      return "Custom Auth System"
    }
  }
  
  /// Failable initializer to create an `AuthProvider` from it's corresponding `name` value.
  /// - Parameter rawValue: String value representing `AuthProvider`'s name or type.
  init?(rawValue: String) {
    switch rawValue {
    case "Google":
      self = .google
    case "Apple":
      self = .apple
    case "Twitter":
      self = .twitter
    case "Microsoft":
      self = .microsoft
    case "GitHub":
      self = .gitHub
    case "Yahoo":
      self = .yahoo
    case "Facebook":
      self = .facebook
    case "Email & Password Login":
      self = .emailPassword
    case "Email Link/Passwordless":
      self = .passwordless
    case "Phone Number":
      self = .phoneNumber
    case "Anonymous Authentication":
      self = .anonymous
    case "Custom Auth System":
      self = .custom
    default: return nil
    }
  }
}
