-
Notifications
You must be signed in to change notification settings - Fork 39
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
BREAKING: implement Native OIDC as per MSC 3861 #2024
base: main
Are you sure you want to change the base?
BREAKING: implement Native OIDC as per MSC 3861 #2024
Conversation
Implements: - MSC 3861 - Next-generation auth for Matrix, based on OAuth 2.0/OIDC - MSC 1597 - Better spec for matrix identifiers - MSC 2964 - Usage of OAuth 2.0 authorization code grant and refresh token grant - MSC 2965 - OAuth 2.0 Authorization Server Metadata discovery - MSC 2966 - Usage of OAuth 2.0 Dynamic Client Registration in Matrix - MSC 2967 - API scopes - MSC 3824 - OIDC aware clients - MSC 4191 - Account management deep-linking Signed-off-by: The one with the braid <[email protected]>
A comment on the changes to the database API: I initially intended to just keep all OIDC-related state (device ID, OAuth2.0 client ID, auth metadata) in memory until the OIDC flow completes. I sadly figured out the Dart process might get killed by the platform for battery optimization. In order to complete the flow after the main process was killed, I decided to store the OAuth2 client ID and the homeserver's auth metadata in the database as well as to split the device ID from the remaining client store since now the device ID is present a long time before the rest of the account is available. Even though I so far already implemented the database API changes with this in mind, there is no way to resume an OIDC flow from a new thread yet. |
Signed-off-by: The one with the braid <[email protected]>
Review notice: So far, the default behavior of the updated |
…i to client Signed-off-by: The one with the braid <[email protected]>
Signed-off-by: The one with the braid <[email protected]>
Signed-off-by: The one with the braid <[email protected]>
Signed-off-by: The one with the braid <[email protected]>
Signed-off-by: The one with the braid <[email protected]>
Signed-off-by: The one with the braid <[email protected]>
Signed-off-by: The one with the braid <[email protected]>
Signed-off-by: The one with the braid <[email protected]>
BREAKING: changes to the database API to better reflect the OIDC state
Work in progress. This implementation is based on the draft of native OIDC I implemented in < polycule >. It can be found here. Unlike in my initial draft, this implementation of course does not rely on any Flutter package but ships a minimal OIDC state machine relying on the matrix client to provide the native callback result via a
Completer
.This implementation does not aim to comply to the full OIDC standard but only the subset required as per the MSCs stated below.
Roadmap:
Implements: