feat: Make FluffyChat OIDC aware client
This commit is contained in:
parent
282f45059c
commit
04aedb0ef6
1 changed files with 18 additions and 1 deletions
|
|
@ -134,7 +134,16 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
bool isDefaultPlatform =
|
||||
(PlatformInfos.isMobile || PlatformInfos.isWeb || PlatformInfos.isMacOS);
|
||||
|
||||
bool get supportsPasswordLogin => _supportsFlow('m.login.password');
|
||||
bool get supportsPasswordLogin =>
|
||||
_supportsFlow('m.login.password') &&
|
||||
// OIDC Aware client we should hide password login if
|
||||
// "delegated_oidc_compatibility" is `true`.
|
||||
// https://github.com/matrix-org/matrix-spec-proposals/blob/hughns/sso-redirect-action/proposals/3824-oidc-aware-clients.md
|
||||
loginFlows?.any(
|
||||
(flow) =>
|
||||
flow.type == 'm.login.sso' && flow.delegateOidcCompatibility,
|
||||
) ==
|
||||
false;
|
||||
|
||||
void ssoLoginAction() async {
|
||||
final redirectUrl = kIsWeb
|
||||
|
|
@ -241,3 +250,11 @@ class IdentityProvider {
|
|||
brand: json['brand'],
|
||||
);
|
||||
}
|
||||
|
||||
extension on LoginFlow {
|
||||
bool get delegateOidcCompatibility =>
|
||||
additionalProperties.tryGet<bool>('delegated_oidc_compatibility') ??
|
||||
additionalProperties
|
||||
.tryGet<bool>('org.matrix.msc3824.delegated_oidc_compatibility') ??
|
||||
false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue