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

AuthorMikkel Thygesen<mth@dwarf.dk>
Date2025-09-02 13:37:50 +0200
Updated MSAL implementation

Changed files

comwell_key_app/lib/routing/app_router.dart | 25 ++++++-------------------
 1 file changed, 6 insertions(+), 19 deletions(-)

Diff

diff --git a/comwell_key_app/lib/routing/app_router.dart b/comwell_key_app/lib/routing/app_router.dart
index 27e1c1ac..df8f170f 100644
--- a/comwell_key_app/lib/routing/app_router.dart
+++ b/comwell_key_app/lib/routing/app_router.dart
@@ -211,26 +211,10 @@ GoRouter goRouter() {
);
}),
GoRoute(
- path: "/api/auth/login/callback",
+ path: "/${AppRoutes.overview.name}",
name: AppRoutes.overview.name,
builder: (context, state) {
- print("qqq uri=${state.uri}");
- print("qqq keys=${state.uri.queryParameters.keys.toList()}");
- print("qqq fragments=${state.uri.fragment}");
-
- final code = state.uri.fragment.split('=')[1];
- print("${{
- "qqq": "",
- "code": code,
- }}");
- return FutureBuilder(
- future: authRepo.loginWithCode(code),
- builder: (context, snapshot) {
- if (snapshot.connectionState == ConnectionState.waiting) {
- return const Scaffold();
- }
- return const OverviewPage();
- });
+ return const OverviewPage();
},
routes: [
GoRoute(
@@ -337,7 +321,10 @@ GoRouter goRouter() {
final queryForced = state.uri.queryParameters['forced'] ?? 'false';
final forced = bool.parse(queryForced);
return BlocProvider(
- create: (context) => LoginCubit(forced: forced),
+ create: (context) => LoginCubit(
+ authRepository: locator.get(),
+ forced: forced,
+ ),
child: const LoginPage());
},
),