Skip to content

Instantly share code, notes, and snippets.

@pcustic
Created January 16, 2024 12:03
Show Gist options
  • Save pcustic/2c5593f36f2d46353ada6a7c8a56b322 to your computer and use it in GitHub Desktop.
Save pcustic/2c5593f36f2d46353ada6a7c8a56b322 to your computer and use it in GitHub Desktop.
app/models.py
def generate_reset_password_token(self):
serializer = URLSafeTimedSerializer(current_app.config["SECRET_KEY"])
return serializer.dumps(self.email, salt=self.password_hash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment