Open samtstern opened 7 years ago
FYI firebase/FirebaseUI-Android#583 was merged into our version-2.0.0-dev
branch.
if I'm not mistaken all mentioned operations are implemented in Account Management flow (https://github.com/firebase/FirebaseUI-iOS/pull/261) which has re-authenticate feature
@yramanchuk this is true. But we need to expose the reauthenticate
function separate from that flow to meet the original developer request.
It would also be good if you have time to implement reauth first since @amandle already did that and account management could take a lot longer.
Although we have put account management on the backburner, I would still like to get this done since the work has already been done for Android.
Yury / Morgan does either of you have time for this before the next release? I could always make the Android version private
and expose it in a later release but that would be a bummer since @amandle did good work.
I have used FUIPhoneAuth with signInWithPresentingViewController: and now need to reauthenticateWithCredential:
My problem is I cannot get hold of the "verificationID", which I then can use to get the FIRAuthCredential in order to re-authenticate.
How do I proceed to do this currently?
Some doc recommends this when not using FUIPhoneAuth (1) [[FIRPhoneAuthProvider provider] verifyPhoneNumber:userInput UIDelegate:nil completion:^(NSString * _Nullable verificationID ....
//save the verificationID in some user preferences...
(2) FIRAuthCredential *credential = [[FIRPhoneAuthProvider provider] credentialWithVerificationID:verificationID verificationCode:userInput];
etc.
@wayneforrest you should be able to use that method regardless of whether or not you're using phone auth. Please file a separate issue for your question.
Many Firebase operations (account delete, update email, etc) require a recent (~5mins) authentication in order to succeed. We should provide a convenience function/flow to re-authenticate the current user.
@amandle has already implemented this on Android (PR not yet merged, planned for version 2.0) Android issue: https://github.com/firebase/FirebaseUI-Android/issues/563 Android implementation: https://github.com/firebase/FirebaseUI-Android/pull/583