javascript - How to create "credential" object needed by Firebase web user.reauthenticate() method? -


the (unclear) example in new docs:

var user = firebase.auth().currentuser; var credential; // prompt user re-provide sign-in credentials user.reauthenticate(credential).then(function() { 

with v3 firebase client, how should create credential object?

i tried:

  • reauthenticate(email, password) (like login method)
  • reauthenticate({ email, password }) (the docs mention 1 argument only)

no luck :(

ps: don't count hours wasted searching relevant info in new docs... miss fabulous firebase.com docs, wanted switch v3 firebase.storage...

i managed make work, docs should updated include not want spend time in exhaustive-but-hard-to-read reference.

the credential object created so:

const user = firebase.auth().currentuser; const credential = firebase.auth.emailauthprovider.credential(     user.email,      userprovidedpassword ); 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -