Skip to content
Back to skills

Api Fetch With Auth Jawad Chaudhary Hackathone 2 Todo Sp 3

ASecurity

Create authenticated API fetch function in Next.js. Use for frontend API calls.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 2, 2026
ai-agentsnextjsapifrontend

Works with

  • api

Security analysis

A100/100

Scanned June 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill api-fetch-with-auth-jawad-chaudhary-hackathone-2-todo-sp-3 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Fetch With Auth Jawad Chaudhary Hackathone 2 Todo Sp 3?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Fetch With Auth Jawad Chaudhary Hackathone 2 Todo Sp 3
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-api-fetch-with-auth-jawad-chaudhary-hackathone-2-t/badge)](https://www.skillsdirectory.com/skills/majiayu000-api-fetch-with-auth-jawad-chaudhary-hackathone-2-t)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-fetch-with-auth
description: Create authenticated API fetch function in Next.js. Use for frontend API calls.
---
# APIFetchWithAuth Instructions
Input: Endpoint, method, body.
Output: Fetch function.
Steps:
1. Import getSession from better-auth/nextjs.
2. Attach Bearer token.
Example Code:
import { getSession } from 'better-auth/nextjs';
async function apiFetch(url: string, method: string, body?: any) {
  const session = await getSession();
  const token = session?.token;
  return fetch(url, {
    method,
    headers: { Authorization: `Bearer ${token}` },
    body: body ? JSON.stringify(body) : undefined,
  });
}

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.