requireAuth method

void requireAuth([
  1. String? message
])

Requires authentication - throws exception if not authenticated.

Implementation

void requireAuth([String? message]) {
  if (isGuest) {
    throw AuthException(message ?? 'Authentication required');
  }
}