getSessionForUser method

DSAuthSession? getSessionForUser(
  1. String userId
)

Gets session for a user

Implementation

DSAuthSession? getSessionForUser(String userId) {
  return _sessions.values.firstWhere(
    (session) => session.userId == userId,
    orElse: () => throw StateError('No session found'),
  );
}