diff --git a/make_post_sell/lib/mail.py b/make_post_sell/lib/mail.py index 891a9ff..7ac42d4 100644 --- a/make_post_sell/lib/mail.py +++ b/make_post_sell/lib/mail.py @@ -20,36 +20,22 @@ from make_post_sell.lib.mail_messages import ( ) -def send_otp_email(request, to_email, raw_otp, return_to): +def send_verification_digits_to_email(request, to_email, raw_digits): """ - Send email with OTP (one time password) link. + Send email with raw_digits a user may pass to verify & authenticate. request the request (of the successful log in attempt) to_email - the email address to send the OTP link + the email address to send the raw_digits - raw_otp - the raw (unencrypted) one time password - - return_to - the URI to return the user on successful authentication + raw_digits: + the raw (unencrypted) digits the user may use to verify & authenticate. """ - - query_params = [ - "email={}".format(quote_plus(to_email)), - "raw-otp={}".format(raw_otp), - ] - - if return_to: - query_params.append("return-to={}".format(return_to)) - - link = "{0}/join-or-log-in?{1}".format(request.app_url, "&".join(query_params)) - - subject = "Your log in link" - message_text = WELCOME_1_TEXT.format(link) - message_html = WELCOME_1_HTML.format(subject, link) + subject = "Verification Code" + message_text = WELCOME_1_TEXT.format(raw_digits) + message_html = WELCOME_1_HTML.format(subject, raw_digits) send_pyramid_email(request, to_email, subject, message_text, message_html) diff --git a/make_post_sell/lib/mail_messages.py b/make_post_sell/lib/mail_messages.py index 69fd649..0a07acf 100644 --- a/make_post_sell/lib/mail_messages.py +++ b/make_post_sell/lib/mail_messages.py @@ -1,9 +1,9 @@ WELCOME_1_TEXT = """ Hey there! -Here is the log in link that you requested. +Here is the verification code you requested. -You may paste this link into your browser to log in: +Type code into the challenge input field: \n{0}\n @@ -19,23 +19,14 @@ WELCOME_1_HTML = """
- Here is the log in link that you requested: + Here is the verification code you requested.
- Click here to log in! + Type code into the challenge input field:
-
-
- You may paste this link into your browser to log in:
-
-
-
-
- {1}
-
-
{1}