sign in with pocketbase working
This commit is contained in:
+14
-12
@@ -1,6 +1,8 @@
|
||||
/// Shared string keys, timings, and layout breakpoints used across the app.
|
||||
library;
|
||||
|
||||
import 'app_config.dart';
|
||||
|
||||
/// Human-readable name shown in the splash screen, app bars, and About tile.
|
||||
const String kAppName = 'IngTrak';
|
||||
|
||||
@@ -10,18 +12,14 @@ const String kPackageName = 'com.example.myapp';
|
||||
/// How long the splash screen stays visible before navigating to the shell.
|
||||
const Duration kSplashDuration = Duration(seconds: 2);
|
||||
|
||||
/// Base URL for the personal ingtrak FastAPI backend.
|
||||
///
|
||||
/// Override at build/run time:
|
||||
/// `flutter run --dart-define=API_BASE_URL=https://ingtrak.satoshinakamoto.win`
|
||||
///
|
||||
/// Local defaults (when override omitted):
|
||||
/// - Android emulator → `http://10.0.2.2:8000`
|
||||
/// - Physical device on LAN → `http://192.168.x.x:8000`
|
||||
const String kApiBaseUrl = String.fromEnvironment(
|
||||
'API_BASE_URL',
|
||||
defaultValue: 'https://ingtrak.satoshinakamoto.win',
|
||||
);
|
||||
/// FastAPI bank backend. From `.env` / `--dart-define=API_BASE_URL=…`.
|
||||
String get kApiBaseUrl => AppConfig.apiBaseUrl;
|
||||
|
||||
/// PocketBase server. From `.env` / `--dart-define=POCKETBASE_URL=…`.
|
||||
String get kPocketBaseUrl => AppConfig.pocketBaseUrl;
|
||||
|
||||
/// PocketBase auth collection name (default `usersapp`).
|
||||
String get kPocketBaseUsersCollection => AppConfig.pocketBaseUsersCollection;
|
||||
|
||||
/// Enable Banking redirect derived from [kApiBaseUrl].
|
||||
/// Must match backend `REDIRECT_URI` and the Control Panel whitelist.
|
||||
@@ -32,6 +30,7 @@ String get kEnableBankingRedirectUri {
|
||||
: kApiBaseUrl;
|
||||
return '$base/api/connect/callback';
|
||||
}
|
||||
|
||||
/// Optional app-scheme bounce used after the http callback (not registered
|
||||
/// with Enable Banking).
|
||||
const String kBankRedirectScheme = 'ingtrak';
|
||||
@@ -46,6 +45,9 @@ abstract final class StorageKeys {
|
||||
static const txMetaLegacy = 'tx_meta_v1';
|
||||
static const bankCache = 'bank_cache_v1';
|
||||
static const importedTransactions = 'imported_txs_v1';
|
||||
|
||||
/// Serialized PocketBase auth token + user record (separate from tx data).
|
||||
static const pocketBaseAuth = 'pb_auth_v1';
|
||||
}
|
||||
|
||||
/// Named routes registered on [MaterialApp].
|
||||
|
||||
Reference in New Issue
Block a user