     if let cached = OAuthClient.cachedCredentials(mode: mode) {
       if (cached.isValid || cached.hasRefreshToken) {
         let status = ProviderAuth.Status.Connected(nil)
-        return ProviderAuth(status: status, modeIdentifier: mode, provider: nil)
+        return ProviderAuth(status: status, modeIdentifier: mode)
       } else {
         // Remove outdated credentials that we can't renew
         OAuthClient.removeCredentials(mode: mode)

  
  /// Mode identifier that this authentication is for
  public let modeIdentifier: String
  
  // TODO: Do we need both mode identifier + provider?
  public let provider: String?
  
  /// Current authentication status
  public var isConnected: Bool {

    
    self.modeIdentifier = mode
    self.status = status
  }
}

