-
Notifications
You must be signed in to change notification settings - Fork 5
HTTPS applink support for iOS and Android first try #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: test
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,14 +44,16 @@ | |
|
|
||
| <!-- The following permissions are used in the Context Package --> | ||
|
|
||
| <!--Location Permissions--> | ||
| <!--Location | ||
| Permissions--> | ||
| <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
| <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
| <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> | ||
|
|
||
| <!--Foreground Service Permissions for Android >= 14 / SDK 34--> | ||
| <!--Foreground | ||
| Service Permissions for Android >= 14 / SDK 34--> | ||
|
Comment on lines
+53
to
+54
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this got into 2 lines? |
||
| <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> | ||
|
|
||
| <!-- for Android 9 (API 28 and below), use: --> | ||
| <uses-permission | ||
| android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" | ||
|
|
@@ -121,14 +123,6 @@ | |
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
|
|
||
| <data android:scheme="carp-ws-prod-auth" android:host="auth" /> | ||
| </intent-filter> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
|
|
||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
|
|
||
|
Comment on lines
-124
to
-131
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this not used by anything? |
||
| <data android:scheme="http" /> | ||
| <data android:host="carp.computerome.dk" /> | ||
| <data android:pathPrefix="/auth/dev" /> | ||
|
|
@@ -171,15 +165,42 @@ | |
| <action android:name="android.intent.action.MAIN" /> | ||
| <category android:name="android.intent.category.LAUNCHER" /> | ||
| </intent-filter> | ||
| <!-- Deep linking --> | ||
| <intent-filter | ||
| android:autoVerify="true" > | ||
|
|
||
| <action android:name="android.intent.action.VIEW" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
|
|
||
| <data android:scheme="https" android:host="study.app.carp.computerome.dk" | ||
| android:pathPattern="/auth/realms/Carp/login-actions/action-token" /> | ||
| <data android:scheme="https" android:host="study.app.test.carp.dk" | ||
| android:pathPattern="/auth/realms/Carp/login-actions/action-token" /> | ||
| <data android:scheme="https" android:host="study.app.dev.carp.dk" | ||
| android:pathPattern="/auth/realms/Carp/login-actions/action-token" /> | ||
|
|
||
| </intent-filter> | ||
|
|
||
| <!-- Handle custom carp-studies URI scheme so deep links like | ||
| carp-studies:/login open the MainActivity (not a helper | ||
| callback activity) and keep the Flutter app running. --> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
| <data android:scheme="carp-studies" android:pathPrefix="/" /> | ||
| </intent-filter> | ||
| </activity> | ||
| <activity | ||
| android:name="com.linusu.flutter_web_auth_2.CallbackActivity" | ||
| android:exported="true"> | ||
| <intent-filter android:label="flutter_web_auth_2"> | ||
| <intent-filter | ||
| android:label="flutter_web_auth_2"> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
| <category android:name="android.intent.category.DEFAULT" /> | ||
| <category android:name="android.intent.category.BROWSABLE" /> | ||
| <data android:scheme="carp-studies" android:pathPrefix="/" /> | ||
| <data android:scheme="carp-studies-anonymous" android:pathPrefix="/" /> | ||
| </intent-filter> | ||
| </activity> | ||
| <activity | ||
|
|
||
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Scheme | ||
| LastUpgradeVersion = "1510" | ||
| version = "1.3"> | ||
| version = "1.7"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this version upgrade for? |
||
| <BuildAction | ||
| parallelizeBuildables = "YES" | ||
| buildImplicitDependencies = "YES"> | ||
|
|
@@ -91,6 +91,13 @@ | |
| ReferencedContainer = "container:Runner.xcodeproj"> | ||
| </BuildableReference> | ||
| </BuildableProductRunnable> | ||
| <EnvironmentVariables> | ||
| <EnvironmentVariable | ||
| key = "DART_DEFINES" | ||
| value = "ZGVwbG95bWVudC1tb2RlPWRldg==" | ||
| isEnabled = "YES"> | ||
| </EnvironmentVariable> | ||
| </EnvironmentVariables> | ||
|
Comment on lines
+94
to
+100
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs explanation, dart define should be part of the build parameters or what is this for? |
||
| </LaunchAction> | ||
| <ProfileAction | ||
| buildConfiguration = "Profile" | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,9 @@ | |
| <dict> | ||
| <key>com.apple.developer.associated-domains</key> | ||
| <array> | ||
| <string>applinks:carp.computerome.dk</string> | ||
| <string>applinks:study.app.dev.carp.dk</string> | ||
| <string>applinks:study.app.test.carp.dk</string> | ||
| <string>applinks:study.app.carp.computerome.dk</string> | ||
|
Comment on lines
+7
to
+9
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where is prod fro carp.dk |
||
| </array> | ||
| <key>com.apple.developer.authentication-services.autofill-credential-provider</key> | ||
| <true/> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,7 @@ class CarpBackend { | |
| authURL: uri, | ||
| clientId: 'studies-app', | ||
| redirectURI: Uri.parse('carp-studies-auth://auth'), | ||
| anonymousRedirectURI: Uri.parse('carp-studies:/anonymous'), | ||
| anonymousRedirectURI: Uri.parse('carp-studies-anonymous://anonymous'), | ||
| // For authentication at CAWS the path is '/auth/realms/Carp' | ||
| discoveryURL: uri.replace(pathSegments: [ | ||
| 'auth', | ||
|
|
@@ -115,12 +115,15 @@ class CarpBackend { | |
| Future<void> authenticateWithMagicLink(String uri) async { | ||
| try { | ||
| await initialize(); | ||
| if (Platform.isIOS) { | ||
| sleep(const Duration(seconds: 1)); | ||
| } | ||
| user = await CarpAuthService().authenticateWithMagicLink(uri); | ||
| LocalSettings().isAnonymous = true; | ||
| info('$runtimeType - ANONYMOUS User authenticated - user: $user'); | ||
| print('$runtimeType - ANONYMOUS User authenticated - user: $user'); | ||
|
Comment on lines
-120
to
+123
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why changed to print |
||
| } catch (error) { | ||
| user = null; | ||
| warning('$runtimeType - ANONYMOUS Error authenticating user - $error'); | ||
| print('$runtimeType - ANONYMOUS Error authenticating user - $error'); | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,10 +68,15 @@ class _LoginPageState extends State<LoginPage> { | |
| child: TextButton( | ||
| onPressed: () async { | ||
| bool isConnected = await bloc.checkConnectivity(); | ||
| print("isConnected: $isConnected"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove print |
||
| if (isConnected) { | ||
| await bloc.backend.initialize(); | ||
| await bloc.backend.authenticate(); | ||
| if (context.mounted) context.go(CarpStudyAppState.homeRoute); | ||
| if (context.mounted) { | ||
| WidgetsBinding.instance.addPostFrameCallback((_) { | ||
| context.go(CarpStudyAppState.homeRoute); | ||
| }); | ||
| } | ||
| } else { | ||
| showDialog<bool>( | ||
| context: context, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this got into 2 lines?