mirror of
				https://gitlab.com/famedly/fluffychat.git
				synced 2025-11-03 22:07:23 +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 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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user