feat: auth

This commit is contained in:
efrilm
2025-08-16 17:48:49 +07:00
parent 255b10d5a9
commit edf067369d
9 changed files with 1006 additions and 79 deletions
@@ -42,4 +42,20 @@ class AuthRepository implements IAuthRepository {
return left(const AuthFailure.unexpectedError());
}
}
@override
Future<Either<AuthFailure, User>> currentUser() async {
try {
User user = await _localDataProvider.currentUser();
return right(user);
} catch (e, s) {
log('currentUserError', name: _logName, error: e, stackTrace: s);
return left(const AuthFailure.unexpectedError());
}
}
@override
Future<bool> hasToken() async {
return await _localDataProvider.hasToken();
}
}