Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add email to backend #109

Open
lkeegan opened this issue Oct 15, 2024 · 1 comment
Open

add email to backend #109

lkeegan opened this issue Oct 15, 2024 · 1 comment
Labels
backend enhancement New feature or request question Further information is requested

Comments

@lkeegan
Copy link
Member

lkeegan commented Oct 15, 2024

Currently in our UserManager class the methods for forgot password and email confirmation after signup just print a message to the logs with the generated token:

class UserManager(IntegerIDMixin, BaseUserManager[User, int]):
reset_password_token_secret = app_settings.SECRET
verification_token_secret = app_settings.SECRET
async def on_after_register(self, user: User, request: Request | None = None):
print(f"User {user.id} has registered.")
async def on_after_forgot_password(
self, user: User, token: str, request: Request | None = None
):
print(f"User {user.id} has forgot their password. Reset token: {token}")
async def on_after_request_verify(
self, user: User, token: str, request: Request | None = None
):
print(f"Verification requested for user {user.id}. Verification token: {token}")

We need to modify them to send an email to the user.

I've previously set up a send-only email server for websites using this docker image: https://hub.docker.com/r/boky/postfix

But maybe there is already an email server / account associated with mondey.de that we can/should use instead?

@lkeegan lkeegan added enhancement New feature or request question Further information is requested backend labels Oct 15, 2024
@lkeegan lkeegan added this to the Minimal Viable Product milestone Nov 14, 2024
@lkeegan
Copy link
Member Author

lkeegan commented Nov 25, 2024

For now we should just use a send-only mail server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant