Sends a magic link (secret token) email.
 @param session [Session] A Passwordless Session
182324
def magic_link(session)
      @session = session

      @magic_link = send(Passwordless.mounted_as)
        .token_sign_in_url(session.token)

      email_field = @session.authenticatable.class.passwordless_email_field
      mail(
        to: @session.authenticatable.send(email_field),
        subject: I18n.t("passwordless.mailer.subject")
      )
    end
151675
function onLinkWithEmailAndPassword() {
  var email = $('#link-email').val();
  var password = $('#link-password').val();
  activeUser().linkWithCredential(
      firebase.auth.EmailAuthProvider.credential(email, password))
      .then(onAuthUserCredentialSuccess, onAuthError);
}
715354
def send_email_confirmation_instructions(self, user):
        
        token = self.security_utils_service.generate_confirmation_token(user)
        confirmation_link = url_for('security_controller.confirm_email',
                                    token=token, _external=True)
        self.send_mail(
            _('flask_unchained.bundles.security:email_subject.email_confirmation_instructions'),
            to=user.email,
            template='security/email/email_confirmation_instructions.html',
            user=user,
            confirmation_link=confirmation_link)
        confirm_instructions_sent.send(app._get_current_object(), user=user,
                                       token=token)
919241
def send_verification_email(self, body):
        
        return self.client.post(self._url('verification-email'), data=body)
511981
def read_session_token(secret_key, token):
    
    return jwt.decode(token.encode('utf-8'), secret_key,
        algorithms=[token_encryption_algorithm()]
    )
396170
def send(
        self,
        to=None,
        subject=None,
        contents=None,
        attachments=None,
        cc=None,
        bcc=None,
        preview_only=False,
        headers=None,
        newline_to_break=True,
    ):
        
        self.login()
        recipients, msg_string = self.prepare_send(
            to, subject, contents, attachments, cc, bcc, headers, newline_to_break
        )
        if preview_only:
            return (recipients, msg_string)
        return self._attempt_send(recipients, msg_string)
569841
function onSendSignInLinkToEmail() {
  var email = $('#sign-in-with-email-link-email').val();
  auth.sendSignInLinkToEmail(email, getActionCodeSettings()).then(function() {
    alertSuccess('Email sent!');
  }, onAuthError);
}
1175677
def magic_session(db_session=None, url=None):
    

    if db_session is not None:
        yield db_session
    else:
        session = get_session(url, expire_on_commit=False)
        try:
            try:
                yield session
            finally:
                session.commit()
        finally:
            session.close()
1188812
def send_receipt(payment)
      @payment = payment
      @payment_url = public_receipt_payment_url(:payment_id => @payment.id,
                                                :public_token => @payment.public_token)

      mail(:to => "#{@payment.customer.email}", 
           :from => Jackpot.configuration.mailer[:from],
           :subject => "Payment receipt")
    end
1321943
def form_authenticity_token
        raise 'CSRF token secret must be defined' if CSRF_TOKEN_SECRET.nil? || CSRF_TOKEN_SECRET.empty?
        if request.session_options[:id].nil? || request.session_options[:id].empty?
          original_form_authenticity_token
        else
          Digest::SHA1.hexdigest("#{CSRF_TOKEN_SECRET}#{request.session_options[:id]}#{request.subdomain}")
        end
      end
728491
def _get_token(url, email, secret_key):
    '''
    
    '''
    url = urlparse.urljoin(url, 'authenticate')
    data_dict = {"email": email, "secret_key": secret_key}
    query = salt.utils.http.query(url, data=data_dict, method='POST',
                                  decode=True)
    error = query.get('error')
    if error:
        log.error('Cannot obtain NSoT authentication token due to: %s.', error)
        log.debug('Please verify NSoT URL %s is reachable and email %s is valid', url, email)
        return False
    else:
        log.debug('successfully obtained token from nsot!')
        return query['dict'].get('auth_token')
423937
def send_reset_password_instructions(self, user):
        
        token = self.security_utils_service.generate_reset_password_token(user)
        reset_link = url_for('security_controller.reset_password',
                             token=token, _external=True)
        self.send_mail(
            _('flask_unchained.bundles.security:email_subject.reset_password_instructions'),
            to=user.email,
            template='security/email/reset_password_instructions.html',
            user=user,
            reset_link=reset_link)
        reset_password_instructions_sent.send(app._get_current_object(),
                                              user=user, token=token)
1095508
def send_reset_password_instructions(user):
    # type: (User) -> None
    
    token = generate_reset_password_token(user)
    url = url_for("login.reset_password", token=token)
    reset_link = request.url_root[:-1] + url

    subject = _("Password reset instruction for {site_name}").format(
        site_name=current_app.config.get("SITE_NAME")
    )
    mail_template = "password_reset_instructions"
    send_mail(subject, user.email, mail_template, user=user, reset_link=reset_link)
262874
def encode(self, envelope, session, **kwargs):
		
		return WMessengerTextEnvelope(str(WHex(envelope.message())), meta=envelope)
683517
def encode(self, envelope, session, aes_cipher=None, **kwargs):
		
		return WMessengerBytesEnvelope(aes_cipher.encrypt(envelope.message()), meta=envelope)
778695
def send_email_with_callback_token(user, email_token, **kwargs):
    

    try:
        if api_settings.PASSWORDLESS_EMAIL_NOREPLY_ADDRESS:
            # Make sure we have a sending address before sending.

            # Get email subject and message
            email_subject = kwargs.get('email_subject',
                                       api_settings.PASSWORDLESS_EMAIL_SUBJECT)
            email_plaintext = kwargs.get('email_plaintext',
                                         api_settings.PASSWORDLESS_EMAIL_PLAINTEXT_MESSAGE)
            email_html = kwargs.get('email_html',
                                    api_settings.PASSWORDLESS_EMAIL_TOKEN_HTML_TEMPLATE_NAME)

            # Inject context if user specifies.
            context = inject_template_context({'callback_token': email_token.key, })
            html_message = loader.render_to_string(email_html, context,)
            send_mail(
                email_subject,
                email_plaintext % email_token.key,
                api_settings.PASSWORDLESS_EMAIL_NOREPLY_ADDRESS,
                [getattr(user, api_settings.PASSWORDLESS_USER_EMAIL_FIELD_NAME)],
                fail_silently=False,
                html_message=html_message,)

        else:
            logger.debug("Failed to send token email. Missing PASSWORDLESS_EMAIL_NOREPLY_ADDRESS.")
            return False
        return True

    except Exception as e:
        logger.debug("Failed to send token email to user: %d."
                  "Possibly no email on user object. Email entered was %s" %
                  (user.id, getattr(user, api_settings.PASSWORDLESS_USER_EMAIL_FIELD_NAME)))
        logger.debug(e)
        return False
1172487
def save_oauth_session
      super
      auth_session[:auth_attributes] = attributes.reject!{|k, v| v.blank? || !self.respond_to?(k)} unless is_auth_session?
    end