6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit aff8e88a

AuthorMikkel Thygesen<mikkelet@gmail.com>
Date2026-02-12 00:50:30 +0100
3770: Updated structure around auth

Changed files

comwell_key_app/assets/msal/msal_config_prod.json  | 8 +++-----
 comwell_key_app/assets/msal/msal_config_stage.json | 8 +++-----
 comwell_key_app/lib/data/remote/msal_service.dart  | 3 +--
 comwell_key_app/lib/main.dart                      | 2 +-
 4 files changed, 8 insertions(+), 13 deletions(-)

Diff

diff --git a/comwell_key_app/assets/msal/msal_config_prod.json b/comwell_key_app/assets/msal/msal_config_prod.json
index 9c151074..7a0e0f9e 100644
--- a/comwell_key_app/assets/msal/msal_config_prod.json
+++ b/comwell_key_app/assets/msal/msal_config_prod.json
@@ -1,19 +1,17 @@
{
"client_id" : "19a8eb05-01e0-4076-9db3-34bcfefd67d8",
- "redirect_uri" : "msauth://com.comwell.phoenix/VzSiQcXRmi2kyjzcA+mYLEtbGVs=",
+ "redirect_uri" : "msauth://com.comwell.phoenix.prod/VzSiQcXRmi2kyjzcA%2BmYLEtbGVs%3D",
"shared_device_mode_supported": true,
- "account_mode": "MULTIPLE",
"broker_redirect_uri_registered": false,
+ "account_mode": "SINGLE",
"authorization_user_agent": "BROWSER",
"authorities" : [
{
"type": "AAD",
- "authority_url": "https://comwellid.ciamlogin.com/comwellid.onmicrosoft.com",
"audience": {
"type": "AzureADMyOrg",
"tenant_id": "8392ed03-7f96-414a-bc94-4f16dc0b9cf4"
- },
- "default": true
+ }
}
]
}
\ No newline at end of file
diff --git a/comwell_key_app/assets/msal/msal_config_stage.json b/comwell_key_app/assets/msal/msal_config_stage.json
index 7023ca11..9e59b7c4 100644
--- a/comwell_key_app/assets/msal/msal_config_stage.json
+++ b/comwell_key_app/assets/msal/msal_config_stage.json
@@ -1,19 +1,17 @@
{
"client_id" : "19a8eb05-01e0-4076-9db3-34bcfefd67d8",
- "redirect_uri" : "msauth://com.comwell.phoenix.stage/VzSiQcXRmi2kyjzcA+mYLEtbGVs=",
+ "redirect_uri" : "msauth://com.comwell.phoenix.stage/VzSiQcXRmi2kyjzcA%2BmYLEtbGVs%3D",
"shared_device_mode_supported": true,
- "account_mode": "MULTIPLE",
"broker_redirect_uri_registered": false,
+ "account_mode": "SINGLE",
"authorization_user_agent": "BROWSER",
"authorities" : [
{
"type": "AAD",
- "authority_url": "https://comwellidstage.ciamlogin.com/comwellidstage.onmicrosoft.com",
"audience": {
"type": "AzureADMyOrg",
"tenant_id": "8392ed03-7f96-414a-bc94-4f16dc0b9cf4"
- },
- "default": true
+ }
}
]
}
\ No newline at end of file
diff --git a/comwell_key_app/lib/data/remote/msal_service.dart b/comwell_key_app/lib/data/remote/msal_service.dart
index debdfd19..3c458c87 100644
--- a/comwell_key_app/lib/data/remote/msal_service.dart
+++ b/comwell_key_app/lib/data/remote/msal_service.dart
@@ -32,7 +32,7 @@ class MSALService {
default:
throw Exception("Missing config file for flavor $appFlavor");
}
- msAuth = await MultipleAccountPca.create(
+ msAuth = await SingleAccountPca.create(
clientId: clientId,
androidConfig: AndroidConfig(
configFilePath: configFilePath,
@@ -68,7 +68,6 @@ class MSALService {
final response = await msAuth.acquireTokenSilent(
scopes: scopes,
authority: authorityUrl,
- identifier: msalIdentifier,
);
await _secureStorage.write(constants.accessToken, response.accessToken);
}
diff --git a/comwell_key_app/lib/main.dart b/comwell_key_app/lib/main.dart
index 07b96c30..2555004d 100644
--- a/comwell_key_app/lib/main.dart
+++ b/comwell_key_app/lib/main.dart
@@ -24,7 +24,7 @@ void main() async {
} else if (flavor == 'stage') {
await runMainApp(fb_stage.DefaultFirebaseOptions.currentPlatform, 'env/.env.stage');
} else if (flavor == 'prod') {
- await runMainApp(fb_prod.DefaultFirebaseOptions.currentPlatform, 'env/.env.prod');
+ await runMainApp(fb_prod.DefaultFirebaseOptions.currentPlatform, 'env/.prod.env');
} else {
throw UnsupportedError('Invalid appFlavor: $appFlavor');
}