packages/auth/demo/public/script.js
function onReauthenticateWithEmailLink() {
  var email = $('#link-with-email-link-email').val();
  var link = $('#link-with-email-link-link').val() || undefined;
  var credential = firebase.auth.EmailAuthProvider
      .credentialWithLink(email, link);
  activeUser().reauthenticateWithCredential(credential)
      .then(function(result) {
        logAdditionalUserInfo(result);
        refreshUserData();
        alertSuccess('User reauthenticated!');
      }, onAuthError);
}
function onReauthenticateWithEmailLink() {
  var email = $('#link-with-email-link-email').val();
  var link = $('#link-with-email-link-link').val() || undefined;
  var credential = firebase.auth.EmailAuthProvider
      .credentialWithLink(email, link);
  activeUser().reauthenticateWithCredential(credential)
      .then(function(result) {
        logAdditionalUserInfo(result);
        refreshUserData();
        alertSuccess('User reauthenticated!');
      }, onAuthError);
}
function onReauthenticateWithEmailLink ( ) { var email = $ ( '#link-with-email-link-email' ) . val ( ) ; var link = $ ( '#link-with-email-link-link' ) . val ( ) || undefined ; var credential = firebase . auth . EmailAuthProvider . credentialWithLink ( email , link ) ; activeUser ( ) . reauthenticateWithCredential ( credential ) . then ( function ( result ) { logAdditionalUserInfo ( result ) ; refreshUserData ( ) ; alertSuccess ( 'User reauthenticated!' ) ; } , onAuthError ) ; }
Re-authenticate a user with email link credential.
Re - authenticate a user with email link credential .