nativescript-plugin-firebase icon indicating copy to clipboard operation
nativescript-plugin-firebase copied to clipboard

getting credential EmailAuthProvider

Open uttahb opened this issue 6 years ago • 7 comments

Is there a way to get the credentials firebase.auth.EmailAuthProvider.credential(email, pass) in the the plugin. I tried with both firebaseWebApi and native api, couldn't find the access to the method.

below link gives the firebase doc for this class

firebase doc Thanks.

uttahb avatar Jan 24 '19 11:01 uttahb

Would you mind adding document references for the native iOS and Android SDKs?

EddyVerbruggen avatar Jan 24 '19 13:01 EddyVerbruggen

Sure android & ios

thanks

uttahb avatar Jan 24 '19 15:01 uttahb

Thanks, so when you login, a credential is created but never returned to the client because I never thought it would be useful. Can you enlighten me how it can be used?

EddyVerbruggen avatar Jan 24 '19 16:01 EddyVerbruggen

Ok, I am using this method to call linkAndRetrieveDataWithCredential() for linking the password account of a user with his google or facebook account in the app.

When a user who already has a google account in the app try to signup with the same email id and a password, i'll make him login with the provider already he logged in with and link this password account with that.

firebase.auth().currentUser.linkAndRetrieveDataWithCredential(credential)

uttahb avatar Jan 24 '19 17:01 uttahb

Any news? As can I see that's recommend to use reauthenticateWithCredential when we need to use operations like updatePassword od updateEmail, but to use reauthenticateWithCredential at first we need to get user credential with EmailAuthProvider for example. Or maybe there is another solution?

plackowski avatar Feb 18 '20 09:02 plackowski

I agree with @plackowski. This information is very helpful for the app. @EddyVerbruggen, can you please suggest a short term "patch" we can do before you officially release the next version with this feature? Thanks!

cupidchan avatar Aug 11 '21 12:08 cupidchan

Any update on this? Badly needed this for operations like updatePassword.

zeejay09 avatar Mar 04 '22 06:03 zeejay09