fix: SSO on web

onboarding
Christian Pauly 4 years ago
parent d68ded5ae0
commit 40dad5e40e

@ -18,6 +18,7 @@ abstract class AppConfig {
static String get privacyUrl => _privacyUrl;
static const String appId = 'im.fluffychat.FluffyChat';
static const String appOpenUrlScheme = 'im.fluffychat';
static const String webBaseUrl = 'https://fluffychat.im/web';
static const String sourceCodeUrl = 'https://gitlab.com/famedly/fluffychat';
static const String supportUrl =
'https://gitlab.com/famedly/fluffychat/issues';

@ -198,7 +198,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
ssoHomeserverKey, Matrix.of(context).client.homeserver.toString());
}
final redirectUrl = kIsWeb
? html.window.location.href
? AppConfig.webBaseUrl
: AppConfig.appOpenUrlScheme.toLowerCase() + '://login';
launch(
'${Matrix.of(context).client.homeserver?.toString()}/_matrix/client/r0/login/sso/redirect/${Uri.encodeComponent(id)}?redirectUrl=${Uri.encodeQueryComponent(redirectUrl)}',

Loading…
Cancel
Save