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
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
Sends a magic link (secret token) email.
 @param session [Session] A Passwordless Session