code: function onSendSignInLinkToEmailCurrentUrl() {
    var email = $('#sign-in-with-email-link-email').val();
    var actionCodeSettings = {
      'url': window.location.href,
      'handleCodeInApp': true
    };
  
    auth.sendSignInLinkToEmail(email, actionCodeSettings).then(function() {
      if ('localStorage' in window && window['localStorage'] !== null) {
        window.localStorage.setItem(
            'emailForSignIn',
            // Save the email and the timestamp.
            JSON.stringify({
              email: email,
              timestamp: new Date().getTime()
            }));
      }
      alertSuccess('Email sent!');
    }, onAuthError);
  }
docs: Sends sign in with email link to the user and pass in current url.