refactor(auth): Migrate session storage to flutter_secure_storage
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// dart format width=80
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// dart format width=80
|
||||
|
||||
// **************************************************************************
|
||||
// InjectableConfigGenerator
|
||||
@@ -9,6 +9,7 @@
|
||||
// coverage:ignore-file
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart' as _i558;
|
||||
import 'package:get_it/get_it.dart' as _i174;
|
||||
import 'package:injectable/injectable.dart' as _i526;
|
||||
import 'package:shared_preferences/shared_preferences.dart' as _i460;
|
||||
@@ -16,10 +17,12 @@ import 'package:shared_preferences/shared_preferences.dart' as _i460;
|
||||
import 'features/launcher/application/client_sync_use_case.dart' as _i757;
|
||||
import 'features/launcher/data/game_installation_service.dart' as _i315;
|
||||
import 'features/launcher/data/launcher_api_client.dart' as _i703;
|
||||
import 'features/preferences/data/repositories/shared_prefs_preferences_repository.dart'
|
||||
as _i662;
|
||||
import 'features/launcher/data/launcher_log_service.dart' as _i43;
|
||||
import 'features/preferences/data/repositories/local_preferences_repository.dart'
|
||||
as _i658;
|
||||
import 'features/preferences/domain/repositories/preferences_repository.dart'
|
||||
as _i44;
|
||||
import 'third_party/flutter_secure_storage.dart' as _i782;
|
||||
import 'third_party/shared_preferences.dart' as _i1006;
|
||||
|
||||
const String _flutter = 'flutter';
|
||||
@@ -32,6 +35,7 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
}) async {
|
||||
final gh = _i526.GetItHelper(this, environment, environmentFilter);
|
||||
final sharedPreferencesModule = _$SharedPreferencesModule();
|
||||
final flutterSecureStorageModule = _$FlutterSecureStorageModule();
|
||||
await gh.factoryAsync<_i460.SharedPreferences>(
|
||||
() => sharedPreferencesModule.prefs,
|
||||
preResolve: true,
|
||||
@@ -39,21 +43,33 @@ extension GetItInjectableX on _i174.GetIt {
|
||||
gh.lazySingleton<_i315.GameInstallationService>(
|
||||
() => _i315.GameInstallationService(),
|
||||
);
|
||||
gh.lazySingleton<_i703.LauncherApiClient>(() => _i703.LauncherApiClient());
|
||||
gh.lazySingleton<_i43.LauncherLogService>(() => _i43.LauncherLogService());
|
||||
gh.lazySingleton<_i558.FlutterSecureStorage>(
|
||||
() => flutterSecureStorageModule.storage,
|
||||
);
|
||||
gh.lazySingleton<_i703.LauncherApiClient>(
|
||||
() => _i703.LauncherApiClient(
|
||||
launcherLogService: gh<_i43.LauncherLogService>(),
|
||||
),
|
||||
);
|
||||
gh.lazySingleton<_i44.PreferencesRepository>(
|
||||
() => _i658.LocalPreferencesRepository(
|
||||
preferences: gh<_i460.SharedPreferences>(),
|
||||
secureStorage: gh<_i558.FlutterSecureStorage>(),
|
||||
),
|
||||
registerFor: {_flutter},
|
||||
);
|
||||
gh.lazySingleton<_i757.ClientSyncUseCase>(
|
||||
() => _i757.ClientSyncUseCase(
|
||||
launcherApiClient: gh<_i703.LauncherApiClient>(),
|
||||
installationService: gh<_i315.GameInstallationService>(),
|
||||
launcherLogService: gh<_i43.LauncherLogService>(),
|
||||
),
|
||||
);
|
||||
gh.lazySingleton<_i44.PreferencesRepository>(
|
||||
() => _i662.SharedPrefsPreferencesRepository(
|
||||
preferences: gh<_i460.SharedPreferences>(),
|
||||
),
|
||||
registerFor: {_flutter},
|
||||
);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
class _$SharedPreferencesModule extends _i1006.SharedPreferencesModule {}
|
||||
|
||||
class _$FlutterSecureStorageModule extends _i782.FlutterSecureStorageModule {}
|
||||
|
||||
Reference in New Issue
Block a user