chore: Update redirect android scheme
This commit is contained in:
parent
9d229e04c6
commit
e0c20f249b
3 changed files with 5 additions and 4 deletions
|
|
@ -31,7 +31,7 @@ abstract class AppConfig {
|
||||||
static const String howDoIGetStickersTutorial =
|
static const String howDoIGetStickersTutorial =
|
||||||
'https://fluffy.chat/faq/#how_do_i_get_stickers';
|
'https://fluffy.chat/faq/#how_do_i_get_stickers';
|
||||||
static const String appId = 'im.fluffychat.FluffyChat';
|
static const String appId = 'im.fluffychat.FluffyChat';
|
||||||
static const String appOpenUrlScheme = 'chat.fluffy';
|
static const String appOpenUrlScheme = 'im.fluffychat';
|
||||||
|
|
||||||
static const String sourceCodeUrl =
|
static const String sourceCodeUrl =
|
||||||
'https://github.com/krille-chan/fluffychat';
|
'https://github.com/krille-chan/fluffychat';
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ Future<void> oidcLoginFlow(
|
||||||
Logs().i('Starting Matrix Native OIDC Flow...');
|
Logs().i('Starting Matrix Native OIDC Flow...');
|
||||||
final redirectUrl = kIsWeb
|
final redirectUrl = kIsWeb
|
||||||
? Uri.parse(html.window.location.href.split('#').first.split('?').first)
|
? Uri.parse(html.window.location.href.split('#').first.split('?').first)
|
||||||
: (PlatformInfos.isMobile || PlatformInfos.isWeb || PlatformInfos.isMacOS)
|
: (PlatformInfos.isMobile || PlatformInfos.isMacOS)
|
||||||
? Uri.parse('${AppConfig.appOpenUrlScheme.toLowerCase()}:/login')
|
? Uri.parse('${AppConfig.appOpenUrlScheme.toLowerCase()}:/login')
|
||||||
: Uri.parse('http://localhost:3001/login');
|
: Uri.parse('http://localhost:3001/login');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,16 @@ Future<void> ssoLoginFlow(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
bool signUp,
|
bool signUp,
|
||||||
) async {
|
) async {
|
||||||
Logs().i('Starting legacy SSO Flow...');
|
|
||||||
final redirectUrl = kIsWeb
|
final redirectUrl = kIsWeb
|
||||||
? Uri.parse(
|
? Uri.parse(
|
||||||
html.window.location.href,
|
html.window.location.href,
|
||||||
).resolveUri(Uri(pathSegments: ['auth.html'])).toString()
|
).resolveUri(Uri(pathSegments: ['auth.html'])).toString()
|
||||||
: (PlatformInfos.isMobile || PlatformInfos.isWeb || PlatformInfos.isMacOS)
|
: (PlatformInfos.isMobile || PlatformInfos.isMacOS)
|
||||||
? '${AppConfig.appOpenUrlScheme.toLowerCase()}://login'
|
? '${AppConfig.appOpenUrlScheme.toLowerCase()}://login'
|
||||||
: 'http://localhost:3001//login';
|
: 'http://localhost:3001//login';
|
||||||
|
|
||||||
|
Logs().i('Starting legacy SSO Flow with redirect URL', redirectUrl);
|
||||||
|
|
||||||
final url = client.homeserver!.replace(
|
final url = client.homeserver!.replace(
|
||||||
path: '/_matrix/client/v3/login/sso/redirect',
|
path: '/_matrix/client/v3/login/sso/redirect',
|
||||||
queryParameters: {
|
queryParameters: {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue