Update auth.py
Browse files
auth.py
CHANGED
@@ -97,9 +97,9 @@ def register(user: UserCreate, db: Session):
|
|
97 |
|
98 |
# Generate a verification token
|
99 |
verification_token = generate_verification_token(user.email)
|
100 |
-
|
101 |
# Send a verification email
|
102 |
-
send_verification_email(user.email,
|
103 |
|
104 |
# Verify the email
|
105 |
# verify_email(verification_token, db)
|
@@ -124,9 +124,9 @@ def resetpassword(user: User, db: Session):
|
|
124 |
# Generate a verification token
|
125 |
verification_token = generate_verification_token(user.email)
|
126 |
|
127 |
-
# Send a verification email with reset
|
128 |
-
reset_link = f"https://
|
129 |
-
send_verification_email(user.email,
|
130 |
|
131 |
# Update the user's email verification token
|
132 |
user.email_verification_token = verification_token
|
|
|
97 |
|
98 |
# Generate a verification token
|
99 |
verification_token = generate_verification_token(user.email)
|
100 |
+
reset_link = f"https://gregniuki-loginauth.hf.space/verify/?token={verification_token}
|
101 |
# Send a verification email
|
102 |
+
send_verification_email(user.email, reset_link)
|
103 |
|
104 |
# Verify the email
|
105 |
# verify_email(verification_token, db)
|
|
|
124 |
# Generate a verification token
|
125 |
verification_token = generate_verification_token(user.email)
|
126 |
|
127 |
+
# Send a verification email with reset linkhttps://gregniuki-loginauth.hf.space/verify/{verification_token}
|
128 |
+
reset_link = f"https://gregniuki-loginauth.hf.space/reset-password?token={verification_token}"
|
129 |
+
send_verification_email(user.email, reset_link)
|
130 |
|
131 |
# Update the user's email verification token
|
132 |
user.email_verification_token = verification_token
|