1
0
mirror of https://github.com/element-hq/element-x-android.git synced 2026-10-23 18:49:00 +03:00
Files
element-x-android/docs/oauth.md
Quentin Gliech 2226eb5162 Remove the reference to the decommissioned OIDC playground
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 17:58:14 +02:00

2.2 KiB

This file contains some rough notes about OAuth implementation, with some examples of actual data.

ios implementation

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

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 OAuthData (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

OAuth client example: 39ad8a4680/examples/oidc_cli/src/main.rs OAuth sdk doc: 39ad8a4680/crates/matrix-sdk/src/oidc.rs

Test server: synapse-oidc.lab.element.dev