why it say "Extra arguments at positions #3 , #4 in call" in SwiftUI?

I have small problem in my project, it throw an error as a Extra arguments at positions #3, #4

for

 Auth.auth().signIn()

line, I do not know what I missed?

    
    func login(email: String, password: String, name: String, surname: String) -> Future<User?, Never> {
        return Future<User?, Never> { promise in
            Auth.auth().signIn(withEmail: email, password: password, name: name, surname: surname) {(authResult, _) in
                guard let id = authResult?.user.providerID,
                    let email = authResult?.user.email else {
                        promise(.success(nil))
                        return
                }
                let user = User(id: id, email: email, name:name, surname:surname)
                promise(.success(user))
            }
        }
    }

model:

import Foundation

struct User {
    let id: String
    let email: String
   let name: String
   let surname: String
}

Answered by Claude31 in 706515022

In Firebase doc,

https://firebase.google.com/docs/auth/ios/email-link-auth#swift_1

the API for signIn is:

        Auth.auth().signIn(withEmail: email, link: self.link) { user, error in … }

Where did you get this API ?

Auth.auth().signIn(withEmail: email, password: password, name: name, surname: surname) {(authResult, _) in
Accepted Answer

In Firebase doc,

https://firebase.google.com/docs/auth/ios/email-link-auth#swift_1

the API for signIn is:

        Auth.auth().signIn(withEmail: email, link: self.link) { user, error in … }

Where did you get this API ?

Auth.auth().signIn(withEmail: email, password: password, name: name, surname: surname) {(authResult, _) in
why it say "Extra arguments at positions #3 , #4 in call" in SwiftUI?
 
 
Q