-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Logout Callback Functionality #39
Conversation
Hello @cuducos please review this pr 😄 |
Thank you for the great PR description! I appreciate the effort you put into it. I kindly ask that you refrain from commenting for reviews, as it adds unnecessary noise to my inbox. I have a full-time job and a personal life, along with my involvement in this and other open-source projects. Please rest assured that I will review your code as soon as possible, but I do have other priorities now. Thank you for your understanding 💜 |
Hey, I am really sorry, I do understand... Please take your time to review this PR 😀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is great, thank you so much.
Before moving forward, I would like to ask you two things:
- Can you add something about the new feature to the docs? You have great content as the PR description you could just move there
- Are you familiar with
unittest.mock
? I suggest we refactor the test you added
None of my comments are blocking, I just wanna you to let me know if you are ki to address them, so I can keep this PR open. Otherwise, I'll merge and fix them in follow up work.
Hey @cuducos thank you for reviewing my PR, I would like to fix all of the issues 😄 |
@cuducos could you please specify which part of the existing documentation should I add the docs about this feature and which things do I need to mention there? |
I was thinking about a section in Configuring. The examples there should give you an idea about what to include, right? |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Looks great ✨ Thank you so much, @Zingzy 💜 |
Overview
This PR introduces the ability to register and execute callback functions upon user logout in the
SimpleLogin
class. This enhancement allows users to perform custom actions, such as logging events or clearing additional session data, immediately after a user logs out.Changes
Modified
logout
Method:New Method
register_on_logout_callback
:register_on_logout_callback
to allow users to register their custom callback functions.Updated Tests:
Code Example
Here's how users can register their custom callbacks:
Testing
Manual Testing:
Automated Testing:
pytest
to ensure all tests pass successfully.Additional Notes
This PR addresses issue #36