onecrayon / onecrayon/api.ashes.live
Global logout logic
Open
Nobody has claimed this yet.
help wanted
- Dominant language
- Python
- Stars
- 13
- Forks
- 7
- Avg merge
- 7h 39m
- Merged PRs (30d)
- 1
Description
We need to expire all of a user's tokens when they change or reset their password:
- Add a nullable
tokens_invalid_beforeDateTime column to the User model - Create migration (then verify the behavior in editor, and strip out auto-generated comments):
$ make shell-db root@hash:/code# alembic revision --autogenerate -m "Short description here" - Add logic to the token verification logic to check if the user has a
tokens_invalid_beforetimestamp set, and if so ensure that the token's "issued at" timestamp is after that point (otherwise reject the token) - Update the code logic for password resets and changing passwords to invalidate tokens issued prior to the time the new password is set
- Add tests to bring coverage to 100% for the new code
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the User model, token verification logic, and password reset and password-change handlers. Use make shell-db, then inspect the Alembic autogeneration and migration output. Done means tokens issued before either password operation are rejected, newer tokens continue to work, and tests provide 100% coverage for the new logic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, backend, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100