fix login and add notifications
This commit is contained in:
@@ -88,10 +88,8 @@ class Auth extends _$Auth {
|
||||
@override
|
||||
Future<User?> build() async {
|
||||
// Simple initialization - just check if user is logged in
|
||||
// Don't call getSession() here to avoid ref disposal issues
|
||||
// Do this ONCE on app startup and don't rebuild
|
||||
try {
|
||||
final secureStorage = ref.read(secureStorageProvider);
|
||||
|
||||
// Check if "Remember Me" was enabled
|
||||
final rememberMe = await _localDataSource.getRememberMe();
|
||||
|
||||
@@ -101,6 +99,7 @@ class Auth extends _$Auth {
|
||||
}
|
||||
|
||||
// Check if we have a stored session
|
||||
final secureStorage = ref.read(secureStorageProvider);
|
||||
final sid = await secureStorage.read(key: 'frappe_sid');
|
||||
final userId = await secureStorage.read(key: 'frappe_user_id');
|
||||
final fullName = await secureStorage.read(key: 'frappe_full_name');
|
||||
|
||||
Reference in New Issue
Block a user