I create new users in Firebase with the Firebase Admin SDK by using Node.js.
This process works well, and I see in my Firebase console the new user who has of course never had a login date ("Angemeldet" in German):

Now I want to check on iOS-login of the user, whether it is his first login:
Auth.auth().signIn(withEmail: email, password: password) { (user, error) in
if let error = error
{
self.errorText = error.localizedDescription
self.shouldAnimate = false
return
}
guard user != nil else { return }
if let user = user, let additionalInfo = user.additionalUserInfo {
print(additionalInfo.isNewUser) // Always "false"
self.userViewModel.firstLogin()
}
}
additionalInfo.isNewUser seems to be exactly what I need, but it always returns "false".
In Node.js I create users with this command:
await admin.auth().createUser({
uid: uid.toLowerCase(),
email: uid.toLowerCase(),
emailVerified: true,
password: 'notSetYet',
disabled: false
})
Is this a bug, or what am I doing wrong?