Promptly-Technologies-LLC / fastapi-jinja2-postgres-webapp

A template webapp with a pure-Python FastAPI backend, frontend templating with Jinja2, and a Postgres database to power user auth
https://promptlytechnologies.com/fastapi-jinja2-postgres-webapp/
MIT License
0 stars 0 forks source link

11 fix delete account flow #48

Closed chriscarrollsmith closed 11 hours ago

chriscarrollsmith commented 3 days ago

The User model has a deleted column that we set to True if the user has deleted their account. So we need to make sure that in our auth endpoints and helper functions, we don't return deleted users (or allow deleted users to perform account actions). This approach is more complicated than actually deleting the user, but it has the following advantages:

However, here's the part I don't love:

So, it's possible this is the wrong approach.

chriscarrollsmith commented 3 days ago

Changed my mind and went with a flow where we actually delete the user record.

Additionally, in this PR:

chriscarrollsmith commented 3 days ago

@AkanshuS, want to try your hand at code review? Good skill to know when applying for jobs!