sickn33/agentic-awesome-skills · error · AuthenticationError

Must be logged in

Error message

Must be logged in

What it means

Error "Must be logged in" thrown in sickn33/agentic-awesome-skills.

Source

Thrown at skills/graphql/SKILL.md:718

Symptoms:
- Unauthorized access to data
- Business rules not enforced
- Directive-only security bypassed

Why this breaks:
Directives are good for simple checks but can't handle complex
business logic. "User can edit their own posts, or any post in
groups they moderate" doesn't fit in a directive.

Recommended fix:

# AUTHORIZE IN RESOLVERS

// Simple check in resolver
Mutation: {
  deletePost: async (_, { id }, { user, db }) => {
    if (!user) {
      throw new AuthenticationError('Must be logged in');
    }

    const post = await db.post.findUnique({ where: { id } });

    if (!post) {
      throw new NotFoundError('Post not found');
    }

    // Business logic authorization
    const canDelete =
      post.authorId === user.id ||
      user.role === 'ADMIN' ||
      await userModeratesGroup(user.id, post.groupId);

    if (!canDelete) {
      throw new ForbiddenError('Cannot delete this post');
    }

View on GitHub (pinned to 58d857988f)

When it happens

Trigger: Thrown at skills/graphql/SKILL.md:718 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sickn33/agentic-awesome-skills@58d857988f (2026-08-26). Data as JSON: /api/errors/ff50d7fc91960f8a. Report an issue: GitHub.