* Remove unused SUPPORT_EMAIL_ADDRESS * Improve the callback uri format and customization. Use io.element.android for the scheme of Oidc redirection for Element X. For nightly the scheme will be io.element.android.nightly For debug the scheme will be io.element.android.debug Element Pro is using `io.element`
2.3 KiB
This file contains some rough notes about Oidc implementation, with some examples of actual data.
Rust sdk branch: https://github.com/matrix-org/matrix-rust-sdk/tree/oidc-ffi
Figma https://www.figma.com/file/o9p34zmiuEpZRyvZXJZAYL/FTUE?node-id=133-5426&t=yQXKeANatk6keoZF-0
Server list: https://github.com/element-hq/oidc-playground
Metadata iOS: (from 5f9d07377c/ElementX/Sources/Services/Authentication/AuthenticationServiceProxy.swift (L28))
clientName: InfoPlistReader.main.bundleDisplayName, redirectUri: "io.element.android:/", clientUri: "https://element.io", tosUri: "https://element.io/user-terms-of-service", policyUri: "https://element.io/privacy"
Android: clientName = "Element", redirectUri = "io.element.android:/", clientUri = "https://element.io", tosUri = "https://element.io/user-terms-of-service", policyUri = "https://element.io/privacy"
Example of OidcData (from presentUrl callback): url: https://auth-oidc.lab.element.dev/authorize?response_type=code&client_id=01GYCAGG3PA70CJ97ZVP0WFJY3&redirect_uri=io.element%3A%2Fcallback&scope=openid+urn%3Amatrix%3Aorg.matrix.msc2967.client%3Aapi%3A*+urn%3Amatrix%3Aorg.matrix.msc2967.client%3Adevice%3AYAgcPW4mcG&state=ex6mNJVFZ5jn9wL8&nonce=NZ93DOyIGQd9exPQ&code_challenge_method=S256&code_challenge=FFRcPALNSPCh-ZgpyTRFu_h8NZJVncfvihbfT9CyX8U&prompt=consent
Formatted url: https://auth-oidc.lab.element.dev/authorize? response_type=code& client_id=01GYCAGG3PA70CJ97ZVP0WFJY3& redirect_uri=io.element%3A%2Fcallback& scope=openid+urn%3Amatrix%3Aorg.matrix.msc2967.client%3Aapi%3A*+urn%3Amatrix%3Aorg.matrix.msc2967.client%3Adevice%3AYAgcPW4mcG& state=ex6mNJVFZ5jn9wL8& nonce=NZ93DOyIGQd9exPQ& code_challenge_method=S256& code_challenge=FFRcPALNSPCh-ZgpyTRFu_h8NZJVncfvihbfT9CyX8U& prompt=consent
state: ex6mNJVFZ5jn9wL8
Oidc client example: 39ad8a4680/examples/oidc_cli/src/main.rs
Oidc sdk doc: 39ad8a4680/crates/matrix-sdk/src/oidc.rs
Test server: synapse-oidc.lab.element.dev