strip auth

This commit is contained in:
Fabian Freund
2025-05-25 22:45:44 +02:00
parent 3cedada44e
commit 572b27ad8b
11 changed files with 0 additions and 469 deletions
@@ -1,5 +1,4 @@
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:pocketbase/pocketbase.dart';
import 'package:riverpod/riverpod.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:weblibre/features/user/data/providers.dart';
@@ -21,35 +20,6 @@ Stream<double> iconCacheSizeMegabytes(Ref ref) {
return repository.cacheDao.getIconCacheSize().watchSingle();
}
@Riverpod(keepAlive: true)
AsyncAuthStore authStore(Ref ref) {
const secureStorage = FlutterSecureStorage();
final intial = ref.watch(
_storedAuthDataProvider.select((value) => value.valueOrNull),
);
return AsyncAuthStore(
initial: intial,
save: (data) async {
await secureStorage.write(key: _authKey, value: data);
},
);
}
@Riverpod()
Stream<AuthStoreEvent> authState(Ref ref) {
final authStore = ref.watch(authStoreProvider);
return authStore.onChange;
}
@Riverpod(keepAlive: true)
PocketBase pocketBase(Ref ref) {
final authStore = ref.watch(authStoreProvider);
return PocketBase('http://192.168.2.104:8090', authStore: authStore);
}
@Riverpod()
bool incognitoModeEnabled(Ref ref) {
return ref.watch(