CrisisCleanup / crisiscleanup-4-web

Current Crisis Cleanup Web Application (Version 4) based on Vue 3. This version was launched March 10, 2023.
https://www.crisiscleanup.org/
Apache License 2.0
4 stars 1 forks source link

Add style to Magic Link Email #401

Open aarontitus opened 1 year ago

aarontitus commented 1 year ago

Description

Currently the Magic Link email is unstyled (see https://github.com/CrisisCleanup/crisiscleanup-3-api/blob/5dc360339e238191d363567536c19ea6d2ad503e/crisiscleanup/users/api.py#L862-L870). Instead, it should be sent through the styled email, crisiscleanup-3-api\crisiscleanup\templates\email\magic_link.html, replacing the tag, {magic_link}, which is the full URL to the magic link.

Dependency: https://github.com/CrisisCleanup/crisiscleanup-3-api/pull/1498

aarontitus commented 1 year ago

This is almost done. The magic link arrived and was styled. However, when I looked at the messages database, it contained this entry, which is definitely not styled: {"model": null, "content": "https://crisiscleanup.org/o/callback?code=dSlB5ZVsWK...iiqVwVtlzyR", "sent_to": ["...@crisiscleanup.org"], "object_id": null}

...and the link to log in didn't actually work. It just forwarded me to the login page.

aarontitus commented 1 year ago

...can we throw up an error for expired or previously used magic links?