Skip to content

Commit

Permalink
feat(magic-link): send magic link email
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewleith committed May 6, 2024
1 parent 435c2d8 commit 4ce1638
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/user/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,11 @@ def send_user_email_code(user_to_send_to, data):

secret_code = create_secret_code()

personalisation = {"name": user_to_send_to.name, "verify_code": secret_code}
personalisation = {
"name": user_to_send_to.name,
"link_url_en": "{}/magic-login-link/{}".format(current_app.config["ADMIN_BASE_URL"], secret_code),
"link_url_fr": "{}/magic-login-link/{}?lang=fr".format(current_app.config["ADMIN_BASE_URL"], secret_code),
}

create_2fa_code(
current_app.config["EMAIL_2FA_TEMPLATE_ID"],
Expand Down

0 comments on commit 4ce1638

Please sign in to comment.