-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add event to customize app password token generation #55677
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
base: master
Are you sure you want to change the base?
Add event to customize app password token generation #55677
Conversation
|
Can you explain the usecase for allowing apps to control token generation? Is it to generate something somehow more secure? Would it make sense to instead improve/extend the token generation in server? The new file is missing the license, apart from that the code looks good. |
|
Thanks for your feedback! A concrete use case is that Nextcloud currently generates tokens like By allowing applications to customize token generation through this event, they can enforce these stricter rules (length, charset, or format) without modifying the core token generation logic in the server. This provides more flexibility for environments with advanced compliance or security requirements. I’ll also add the missing license headers to the new files — thanks for pointing that out! |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
I'm fine with the code, but feel like it would make more sense to add some options in the server to control the token generation. |
|
Thanks for the feedback! |
|
Sure @CTabou! |
|
Can you rebase onto the master branch, squash all commits and fix the DCO? |
This adds an AfterAuthTokenCreatedEvent that is dispatched after an authentication token is created. This allows apps to customize or process the generated token. Signed-off-by: Charles Taborin <charles.taborin@leviia.com>
12004c5 to
73ff108
Compare
|
@CTabou please don't update the branch unless there are merge conflicts. It is not necessary and only wastes CI time, because we have to restart it completely. |
|
Hi @provokateurin, Since the PR has approvals and no further changes planned on my side, do you have an idea of when it could be merged, or if there’s anything else needed from me to move it forward? Thanks again for the reviews and for your time 🙂 |
Summary
We want to enable applications to generate their own device and session authentication tokens by introducing an event that fires immediately after token creation, allowing apps to supply a token generated with their own rules (e.g., format, length, charset) before it is persisted.
TODO
Checklist
3. to review, feature component)stable32)Screenshots
Before
After