2 Commits

Author SHA1 Message Date
dependabot[bot]
a136e3b8ca Bump altcha from 0.2.0 to 1.0.0
Bumps [altcha](https://github.com/altcha-org/altcha-lib-py) from 0.2.0 to 1.0.0.
- [Commits](https://github.com/altcha-org/altcha-lib-py/compare/v0.2.0...v1.0.0)

---
updated-dependencies:
- dependency-name: altcha
  dependency-version: 1.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-16 00:44:48 +00:00
Jack Case
a36b6e9865 actually send the email 2025-11-15 16:04:45 +00:00
3 changed files with 7 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
alembic==1.17.0 alembic==1.17.0
altcha==0.2.0 altcha==1.0.0
annotated-types==0.7.0 annotated-types==0.7.0
anyio==4.11.0 anyio==4.11.0
argon2-cffi==23.1.0 argon2-cffi==23.1.0

View File

@@ -34,6 +34,7 @@ from slopserver.settings import settings
from slopserver.models import Domain, Path, User from slopserver.models import Domain, Path, User
from slopserver.models import SlopReport, SignupForm, altcha_validator from slopserver.models import SlopReport, SignupForm, altcha_validator
from slopserver.db import select_slop, insert_slop, get_user, create_user, verify_user_email from slopserver.db import select_slop, insert_slop, get_user, create_user, verify_user_email
from slopserver.email import generate_verification_email, send_email
app = FastAPI() app = FastAPI()
@@ -150,9 +151,10 @@ def signup_form(form_data: Annotated[SignupForm, Form()]):
# send verification email # send verification email
# create a jwt encoding the username and a time limit to be the verification URL # create a jwt encoding the username and a time limit to be the verification URL
token = generate_verification_token(form_data.email) token = generate_verification_token(form_data.email)
return token
email_html = generate_verification_email(settings.api_base + "verify/?token=" + token)
status = send_email(form_data.email, "Slop Farmer Email Verification", email_html)
return status
@app.get("/verify") @app.get("/verify")
def verify_email(token: Annotated[str, AfterValidator(verify_verification_token)]): def verify_email(token: Annotated[str, AfterValidator(verify_verification_token)]):

View File

@@ -8,5 +8,6 @@ class ServerSettings(BaseSettings):
resend_token: str = "re_NXpjzbqR_KgAbu72PKjYHcquX24WvnN3i" resend_token: str = "re_NXpjzbqR_KgAbu72PKjYHcquX24WvnN3i"
sender_email: str = "slopfarmer@jack-case.pro" sender_email: str = "slopfarmer@jack-case.pro"
api_base: str = "api.slopfarmer.jack-case.pro/"
settings = ServerSettings() settings = ServerSettings()