mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 06:52:35 +01:00
fix: SSO on web
This commit is contained in:
parent
cf37d56778
commit
826d8778dd
@ -18,6 +18,7 @@ abstract class AppConfig {
|
|||||||
static String get privacyUrl => _privacyUrl;
|
static String get privacyUrl => _privacyUrl;
|
||||||
static const String appId = 'im.fluffychat.FluffyChat';
|
static const String appId = 'im.fluffychat.FluffyChat';
|
||||||
static const String appOpenUrlScheme = 'im.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 sourceCodeUrl = 'https://gitlab.com/famedly/fluffychat';
|
||||||
static const String supportUrl =
|
static const String supportUrl =
|
||||||
'https://gitlab.com/famedly/fluffychat/issues';
|
'https://gitlab.com/famedly/fluffychat/issues';
|
||||||
|
@ -198,7 +198,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||||||
ssoHomeserverKey, Matrix.of(context).client.homeserver.toString());
|
ssoHomeserverKey, Matrix.of(context).client.homeserver.toString());
|
||||||
}
|
}
|
||||||
final redirectUrl = kIsWeb
|
final redirectUrl = kIsWeb
|
||||||
? html.window.location.href
|
? AppConfig.webBaseUrl
|
||||||
: AppConfig.appOpenUrlScheme.toLowerCase() + '://login';
|
: AppConfig.appOpenUrlScheme.toLowerCase() + '://login';
|
||||||
launch(
|
launch(
|
||||||
'${Matrix.of(context).client.homeserver?.toString()}/_matrix/client/r0/login/sso/redirect/${Uri.encodeComponent(id)}?redirectUrl=${Uri.encodeQueryComponent(redirectUrl)}',
|
'${Matrix.of(context).client.homeserver?.toString()}/_matrix/client/r0/login/sso/redirect/${Uri.encodeComponent(id)}?redirectUrl=${Uri.encodeQueryComponent(redirectUrl)}',
|
||||||
|
Loading…
Reference in New Issue
Block a user