code: function onSignInWithEmailLink() {
    var email = $('#sign-in-with-email-link-email').val();
    var link = $('#sign-in-with-email-link-link').val() || undefined;
    if (auth.isSignInWithEmailLink(link)) {
      auth.signInWithEmailLink(email, link).then(onAuthSuccess, onAuthError);
    } else {
      alertError('Sign in link is invalid');
    }
  }
docs: Signs in a user with an email link.