Mobile Client: change deep link route

This commit is contained in:
Arthi-chaud
2022-03-03 13:40:48 +01:00
parent f4934683a1
commit 946a89125d
3 changed files with 7 additions and 5 deletions
@@ -31,7 +31,7 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="aeris" android:host="aeris.com" />
<data android:scheme="http" android:host="aeris.aera.epi" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
+2 -2
View File
@@ -55,10 +55,10 @@
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>aeris.com</string>
<string>aeris.area.epi</string>
<key>CFBundleURLSchemes</key>
<array>
<string>aeris</string>
<string>http</string>
</array>
</dict>
</array>
+4 -2
View File
@@ -32,6 +32,8 @@ class AerisAPI {
/// JWT token used to request API
late String _jwt;
final String deepLinkRoute = "http://aeris.area.epi";
final String baseRoute = "http://10.29.124.174:81"; ///TODO make it modifiable
/// Name of the file that contains the JWT used for Aeris' API requestd
@@ -128,7 +130,7 @@ class AerisAPI {
String getServiceAuthURL(Service service) {
final serviceName = service == const Service.youtube() ? "google" : service.name.toLowerCase();
return "$baseRoute/auth/$serviceName/url?redirect_uri=aeris://aeris.com/authorization/$serviceName";
return "$baseRoute/auth/$serviceName/url?redirect_uri=$deepLinkRoute/authorization/$serviceName";
}
/// Send PUT request to update Pipeline, returns false if failed
@@ -169,7 +171,7 @@ class AerisAPI {
/// Connects the user from the service
Future<bool> connectService(Service service, String code) async {
var res = await _requestAPI(
'/auth/${service.name.toLowerCase()}?code=$code&redirect_uri=aeris://aeris.com/authorization/${service.name.toLowerCase()}',
'/auth/${service.name.toLowerCase()}?code=$code&redirect_uri=$deepLinkRoute/authorization/${service.name.toLowerCase()}',
AerisAPIRequestType.get,
null);
return res.ok;