Skip to content

MSC4108: Mechanism to allow OAuth 2.0 API sign in and E2EE set up via QR code#4108

Open
hughns wants to merge 71 commits intomainfrom
element-hq/oidc-qr-login
Open

MSC4108: Mechanism to allow OAuth 2.0 API sign in and E2EE set up via QR code#4108
hughns wants to merge 71 commits intomainfrom
element-hq/oidc-qr-login

Conversation

@hughns
Copy link
Copy Markdown
Member

@hughns hughns commented Feb 22, 2024

Rendered

Dependencies:

Video demos:

New EX scans existing EW
MSC4108 v2025 New EX scans existing EW

Existing EX scans new EW
MSC4108 v2025 Existing EX scans new EW

New EX scans existing EX
MSC4108 v2025 New EX scans existing EX


The authors are employed by Element to write this MSC.


Major revisions

The is an older version of this proposal (referred to as "2024") that has some significant differences from the current proposal.

To help avoid confusion on the status, the following is hopefully helpful:

Version name Status Proposal revision Supported by Encryption scheme Discovery of support Proof-of-MSC implementation status
2025 MSC is feature complete and being reviewed Diff to 2024 version latest No production implementations. Experimental feature in Synapse. HPKE Discovery using GET /_matrix/client/v1/rendezvous Fully implemented (see below)
2024 Feature complete, but will be superseded by a new version 87f8317 Experimental feature in Synapse. Supported by Element Web/Desktop to generate QR. Supported by Element X to scan QR to login. ECIES unstable_features.org.matrix.msc4108 is true in /versions response from homeserver Fully implemented (see below)

Proof-of-MSC implementations

2025 version

Flows implemented

Flow Existing device New device
Existing device generates QR to sign in a new device EW or EX EX
Existing device scans QR to sign in a new device EX EW

2024 version

Implementations for 2024 version:

MSC4108 Element X-Web iOS demo

To-dos

The high-level to-do list for the latest version:

  • Update rendezvous session API to avoid issues with ETags
  • Update rendezvous session API so that stylistically it fits better with C-S API
  • Allow rendezvous session creation to require authentication
  • Replace ECIES with HPKE in secure channel
  • Revisit QR code format
  • Proof-of-MSC implementations for all of above
  • Review thread about sequence of protocol_accepted
  • Provide a discovery mechanism that works once the proposal is stabilised

@hughns hughns changed the title Mechanism to allow OIDC sign in and E2EE set up via QR code MSC4108: Mechanism to allow OIDC sign in and E2EE set up via QR code Feb 22, 2024
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:core MSC which is critical to the protocol's success needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Feb 22, 2024
@cyrneko
Copy link
Copy Markdown

cyrneko commented Feb 22, 2024

finally, it is no longer just an idea presented at FOSDEM 🥳

@ara4n
Copy link
Copy Markdown
Member

ara4n commented Feb 22, 2024

tbf there was already MSC3906 - which this will presumably replace, by making it play nice with native OIDC (MSC3861) :)

@hughns hughns force-pushed the element-hq/oidc-qr-login branch from 5cd815f to 177a2db Compare April 3, 2024 15:58
The byte immediately following the `MATRIX` prefix is repurposed as a type which gives a more sensible way to namespace in future.

This also means that we can call the second byte the "intent" very clearly rather than having to call it "mode" to match the existing cross verification QR spec.
Co-authored-by: networkException <github@nwex.de>
@turt2live
Copy link
Copy Markdown
Member

This MSC is listed as "ready for FCP", but appears to have dependencies which are either WIP or not on the "ready for FCP" list themselves. When those dependencies make their way through the process to FCP, please re-raise this MSC in the SCT Office for reconsideration.

poljar added a commit to matrix-org/matrix-rust-sdk that referenced this pull request Jan 29, 2026
Our current implementation of this QR code data type corresponds to the
data type defined in MSC4108. The data format has been updated a bit in
MSC4833 and thus we'll need to support both formats for a while.

This moves al the MSC4108-specific parts into a separate MSC-specific
submodule.

MSC4108: matrix-org/matrix-spec-proposals#4108
poljar added a commit to matrix-org/matrix-rust-sdk that referenced this pull request Jan 29, 2026
…R login data type

This patch adds a view into the MSC-specific and intent specific data
fields of the QR login data type.

MSC4108 and MSC4388 have subtle differences in the way the rendezvous
URL and the server name are shared, this new getter allows us to access
all of those fields in a consistent manner.

MSC4108: matrix-org/matrix-spec-proposals#4108
MSC4388: matrix-org/matrix-spec-proposals#4388
poljar added a commit to matrix-org/matrix-rust-sdk that referenced this pull request Jan 30, 2026
Our current implementation of this QR code data type corresponds to the
data type defined in MSC4108. The data format has been updated a bit in
MSC4833 and thus we'll need to support both formats for a while.

This moves al the MSC4108-specific parts into a separate MSC-specific
submodule.

MSC4108: matrix-org/matrix-spec-proposals#4108
poljar added a commit to matrix-org/matrix-rust-sdk that referenced this pull request Jan 30, 2026
…R login data type

This patch adds a view into the MSC-specific and intent specific data
fields of the QR login data type.

MSC4108 and MSC4388 have subtle differences in the way the rendezvous
URL and the server name are shared, this new getter allows us to access
all of those fields in a consistent manner.

MSC4108: matrix-org/matrix-spec-proposals#4108
MSC4388: matrix-org/matrix-spec-proposals#4388
@hughns
Copy link
Copy Markdown
Member Author

hughns commented Mar 30, 2026

The dependent MSC4388 has not been undrafted and is ready for review.

The sample implementations are now linked and I have added videos demonstrating the full set of flows.

All outstanding conversations have been resolved.

@turt2live turt2live added implementation-needs-checking The MSC has an implementation, but the SCT has not yet checked it. and removed needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Mar 30, 2026
@turt2live
Copy link
Copy Markdown
Member

The author believes this is ready for FCP. Next steps are for SCT members to review the MSC and implementation(s), add the checklist, then propose FCP if appropriate.

@github-project-automation github-project-automation bot moved this to Tracking for review in Spec Core Team Workflow Mar 30, 2026
@turt2live turt2live moved this from Tracking for review to Proposed for FCP readiness in Spec Core Team Workflow Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client-server Client-Server API implementation-needs-checking The MSC has an implementation, but the SCT has not yet checked it. kind:core MSC which is critical to the protocol's success proposal A matrix spec change proposal

Projects

Status: Proposed for FCP readiness

Development

Successfully merging this pull request may close these issues.