aboutsummaryrefslogtreecommitdiff
path: root/jb/api/magic_token.py
diff options
context:
space:
mode:
authorstuppie2026-09-08 16:02:08 -0600
committerstuppie2026-09-08 16:02:08 -0600
commitf3e37a1c73bd0d68966f24995011b5c93305273d (patch)
treea53f3658af3498b707fcabefb48168a464551374 /jb/api/magic_token.py
parent27c2e8fee5c604d64cd06a37afc62db0252f8370 (diff)
downloadamt-jb-f3e37a1c73bd0d68966f24995011b5c93305273d.tar.gz
amt-jb-f3e37a1c73bd0d68966f24995011b5c93305273d.zip
email integration
Diffstat (limited to 'jb/api/magic_token.py')
-rw-r--r--jb/api/magic_token.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/jb/api/magic_token.py b/jb/api/magic_token.py
index e0a1cca..562ba81 100644
--- a/jb/api/magic_token.py
+++ b/jb/api/magic_token.py
@@ -43,10 +43,10 @@ def consume_magic_token(token: str) -> str:
return user_email
-def create_amt_account_link_token(user: User, amt_worker_id: str) -> str:
+def create_amt_account_link_token(email: str, amt_worker_id: str) -> str:
"""Bind an email and AMT worker ID to an opaque, short-lived token."""
data = AmtAccountLink(
- email=user.email,
+ email=email,
amt_worker_id=amt_worker_id,
)
token = secrets.token_urlsafe(32)