'Re-authenticate with provider in Firebase and SwiftUI

I managed to re-authenticate the users with Apple, Facebook, Google, Email, and Phone in Firebase with SwiftUI, but when the users re-authenticate with Facebook or Google, the provider information is already stored there, so the user doesn't really re-authenticate. How can I make the user write their credential information for Facebook and Google when they re-authenticate? enter image description here



Solution 1:[1]

For anyone stuck on the same thing, the best alternative was to use either an email-link or phone number to re-authenticate. And since all users have both, the re-authentication is simple.

Also, side note: If the user signed up by using Google provider and they try to re-authenticate by a email-link (I assume this happens with Facebook and Apple too) Firebase automatically links authentication for Passwordless-autentication to their Google account on my app, which makes re-authentication for sensitive actions really simple!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vebbis