Repository navigation
Conversation
…utes Accepted bearer tokens were trusted for 300 seconds before the platform was asked again, so a deleted or expired token kept working for up to 5 minutes. The window is now 60 seconds.
hardillb
approved these changes
Oct 16, 2026
hardillb
left a comment
Contributor
There was a problem hiding this comment.
Fix the topic lint please
Contributor
Author
|
Done! Didn't realize this repo was using release please |
hardillb
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #777
Part of FlowFuse/flowfuse#8705. The FlowFuse auth plugin's HTTP middleware caches bearer tokens the platform accepted and skipped rechecking them for 300 seconds, so a deleted or expired token kept working against the remote instance's protected endpoints for up to 5 minutes. As decided on the parent issue, the window is now 60 seconds, as a named constant instead of the inline
300, matching the same change in FlowFuse/nr-launcher.There were no tests for the plugin's middleware, so this adds one: it runs requests through the middleware against a fake platform endpoint counting token checks, and a token is trusted at 59 seconds and checked again at 61, failing before the change. It calls the middleware directly rather than through an Express app since the agent doesn't install Express itself. The rest of the lib suite passes, apart from the two MQTT Comms tests that fail the same way on main on my machine.