e2e: Add OAuth2 device-flow tests - #247
Open
mike-scott wants to merge 1 commit into
Open
Conversation
doanac
reviewed
Aug 26, 2026
There is no existing test run for oauth2 and the following use-cases: - A device registering - A fiocli user logging in The shared fixtures run the server in noauth mode, which fabricates a full-scope session on every request and cannot exercise the login redirect, a real user confirming the code, or scope intersection. Instead, stand up a dedicated fioserver with auth-init --local on test ports and drive the flow with Playwright: `fiocli login` through the authorize, deny, and scope-mismatch paths, plus a fio-device-register mimic which registers a device by POSTing a CSR with the minted token base64-encoded. NOTE: The tests run against the server's default per-IP rate limits, so the steps are paced to human speed. Signed-off-by: Michael Scott <mike@foundries.io> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mike-scott
force-pushed
the
oauth2-flow-e2e-testing
branch
from
August 29, 2026 03:47
a0e486c to
d20355b
Compare
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.
The shared fixtures run the server in noauth mode, which fabricates a full-scope session on every request and cannot exercise the login redirect, a real user confirming the code, or scope intersection.
Stand up a dedicated fioserver with auth-init --local on test ports and drive the flow with Playwright:
fiocli loginthrough the authorize, deny, and scope-mismatch paths, plus a fio-device-register mimic that requests the fio-dr 3-part scope format, types the code into the bare verification page, and registers a device by POSTing a CSR with the minted token base64-encoded.The tests run against the server's default per-IP rate limits; so rate-limited steps are paced to human speed.