diff --git a/lib/config.dart b/lib/config.dart index 3ef6550..475c647 100644 --- a/lib/config.dart +++ b/lib/config.dart @@ -5,6 +5,7 @@ class Config { // OIDC pocket-id (client public + PKCE) static const String oidcIssuer = 'https://pocket.nfteam.ovh'; static const String oidcClientId = '83678fb3-9268-42c1-8dcb-0fb141692a6d'; - static const String oidcRedirect = 'nfteam.gamemanager://oidc'; + // App Link HTTPS (fiable ; le schéma custom est bloqué par Chrome au retour) + static const String oidcRedirect = 'https://gamemanager-api.nfteam.ovh/oidc/callback'; static const List oidcScopes = ['openid', 'profile', 'email']; } diff --git a/tool/patch_android.py b/tool/patch_android.py index ff26200..9d01d3d 100644 --- a/tool/patch_android.py +++ b/tool/patch_android.py @@ -20,15 +20,33 @@ with open("android/key.properties", "w") as f: f"storeFile={KEYSTORE_PATH}\n" ) -# 2) AndroidManifest : permissions +# 2) AndroidManifest : permissions + App Link HTTPS (retour OIDC fiable) man = "android/app/src/main/AndroidManifest.xml" s = open(man).read() +# namespace tools (pour merger dans l'activity de flutter_appauth) +if "xmlns:tools" not in s: + s = s.replace("\n' ' \n' ) if "REQUEST_INSTALL_PACKAGES" not in s: s = s.replace("\n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' +) +if "gamemanager-api.nfteam.ovh" not in s: + s = s.replace("", applink + " ", 1) open(man, "w").write(s) # 3) build.gradle : signature + schéma OIDC