     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)

    
    self.modeIdentifier = mode
    self.status = status
    self.provider = dictionary["provider"] as? String
  }
}


  
  /// Mode identifier that this authentication is for
  public let modeIdentifier: String
  
  /// Current authentication status
  public var isConnected: Bool {
