element-hq / element-android

A Matrix collaboration client for Android.

Home Page:https://element.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EA: Use 3PID capability to show / hide email UI in settings for MSC3824 OIDC-aware

hughns opened this issue · comments

Element Android was previously made "OIDC-aware" (as described by MSC3824).

When the homeserver is configured in MSC3861 delegated OIDC mode (e.g. to MAS) the user needs to add and remove 3pids via the UI provided by MAS.

As such, Element Android should check the capability that instructs clients whether or not they can manage 3PIDs: https://spec.matrix.org/v1.7/client-server-api/#m3pid_changes-capability

If the capability is not set to true then the client should hide the UI for managing emails.

n.b. the Identity Server functionality should remain the same as today.

@hughns about your requirement:

If the capability is not set to true then the client should hide the UI for managing emails.

it is conflicting with the spec:

When not listed, clients should assume the user is able to modify their 3PID associations.

This behavior is already implemented: https://github.com/vector-im/element-android/blob/develop/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/homeserver/GetHomeServerCapabilitiesTask.kt#L133

What is missing is the hiding of the settings, I will create a PR about it.