Add QrCode authentication

This commit is contained in:
2025-07-07 19:44:17 +02:00
parent 28d47917cf
commit 0a87ac572b
13 changed files with 125 additions and 17 deletions

View File

@ -4,6 +4,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:moneymgr_mobile/providers/auth_state.dart';
import 'package:moneymgr_mobile/routes/login/login_screen.dart';
import 'package:moneymgr_mobile/routes/login/manual_auth_screen.dart';
import 'package:moneymgr_mobile/routes/login/qr_auth_screen.dart';
import 'package:moneymgr_mobile/routes/settings/settings_screen.dart';
import 'package:moneymgr_mobile/services/router/routes_list.dart';
import 'package:moneymgr_mobile/widgets/scaffold_with_navigation.dart';
@ -61,6 +62,7 @@ GoRouter router(Ref ref) {
routes: [
GoRoute(path: homePage, builder: (_, __) => const Scaffold()),
GoRoute(path: authPage, builder: (_, __) => const LoginScreen()),
GoRoute(path: qrAuthPath, builder: (_, __) => const QrAuthScreen()),
GoRoute(
path: manualAuthPage,
builder: (_, __) => const ManualAuthScreen(),

View File

@ -4,6 +4,9 @@ const homePage = "/";
/// Authentication path
const authPage = "/login";
/// Qr Code authentication
const qrAuthPath = "/login/qr";
/// Manual authentication
const manualAuthPage = "/login/manual";

View File

@ -51,6 +51,7 @@ class SecureStorage {
if (tokenStr != null) {
return ApiToken.fromJson(jsonDecode(tokenStr));
}
return null;
}
/// Set auth token