Gregniuki commited on
Commit
f6cb392
1 Parent(s): f27830c

Update auth.py

Browse files
Files changed (1) hide show
  1. auth.py +5 -5
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, verification_token)
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 link
128
- reset_link = f"https://yourfrontenddomain.com/reset-password?token={verification_token}"
129
- send_verification_email(user.email, verification_token, reset_link)
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