Skip to content

Conversation

@Johennes
Copy link
Contributor

@Johennes Johennes commented Oct 30, 2025

This is a follow-up on #5801 and adds the opposite flow where the existing device scans the QR code generated on the new device.

I have tried to break this down into commits as far as seemed feasible. Unfortunately, git has made a bit off a mess out of the diff for the test cases in the last commit. It might be easier to review that part by looking at the whole file. The commit only adds entirely new test cases.

  • Public API changes documented in changelogs (optional)

@Johennes Johennes force-pushed the johannes/qr-login-4 branch 2 times, most recently from 673b011 to c7d6032 Compare October 30, 2025 15:16
@Johennes Johennes marked this pull request as ready for review October 30, 2025 15:32
@Johennes Johennes requested a review from a team as a code owner October 30, 2025 15:32
@Johennes Johennes requested review from poljar and removed request for a team October 30, 2025 15:32
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

❌ Patch coverage is 96.66667% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.60%. Comparing base (81ff96d) to head (488c3f5).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...atrix-sdk/src/authentication/oauth/qrcode/grant.rs 96.60% 14 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5818      +/-   ##
==========================================
+ Coverage   88.54%   88.60%   +0.05%     
==========================================
  Files         361      361              
  Lines      101533   102140     +607     
  Branches   101533   102140     +607     
==========================================
+ Hits        89904    90502     +598     
- Misses       7418     7419       +1     
- Partials     4211     4219       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Johennes
Copy link
Contributor Author

@poljar I'm really sorry for the onslaught of tedious PRs around QR login. I think after this one there is, luckily, only one left for the bindings to grant login which should hopefully be small.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 30, 2025

CodSpeed Performance Report

Merging #5818 will not alter performance

Comparing Johennes:johannes/qr-login-4 (488c3f5) with main (82c583b)

Summary

✅ 50 untouched

Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks mostly good. I found a couple of nits.

No worries about the amount of QR code PRs and sorry for the delay on this one.

@Johennes Johennes requested a review from poljar November 4, 2025 14:32
Copy link
Contributor

@poljar poljar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, looks good.

Let's just get rid of the fixup commits.

…enerate for better usability and to match the login flow

Signed-off-by: Johannes Marbach <[email protected]>
…lower value for tests to speed them up

Signed-off-by: Johannes Marbach <[email protected]>
…r_code to avoid future name clashes for the opposite flow

Signed-off-by: Johannes Marbach <[email protected]>
@Johennes Johennes force-pushed the johannes/qr-login-4 branch from 81d3f61 to 488c3f5 Compare November 5, 2025 12:08
@Johennes
Copy link
Contributor Author

Johennes commented Nov 5, 2025

History is clean now.

@poljar poljar enabled auto-merge (rebase) November 5, 2025 12:14
@poljar poljar merged commit b4ebc8b into matrix-org:main Nov 5, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants