mirror of
https://github.com/zoriya/Aeris.git
synced 2026-06-07 04:16:42 +00:00
Mobile Client: change deep link route
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user