authentication-proxy

Route browser authentication requests through Next.js API proxy routes.

1|Updated May 26, 2026
One-click install
npx skills add https://github.com/BaraArdiwinata/hackathon-sima-arome --skill authentication-proxy-baraardiwinata
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: authentication-proxy
Source: https://github.com/BaraArdiwinata/hackathon-sima-arome/tree/main/.agents/skills/authentication-proxy
Command: npx skills add https://github.com/BaraArdiwinata/hackathon-sima-arome --skill authentication-proxy-baraardiwinata

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures secure authentication by enforcing server-side proxy routes for all browser-to-backend communication, preventing CORS issues and enhancing security.

Core Features & Use Cases

  • Authentication Proxy: All authentication requests are routed through Next.js API proxy routes, ensuring same-origin communication.
  • CRITICAL RULE: Direct calls to DaaS backend or Supabase Auth from client components are forbidden.
  • Auth Routes: Provides routes for login, logout, user retrieval, OAuth callback, and external OAuth initiation.

Quick Start

Use the authentication-proxy skill to securely log in to the system via the proxy route '/api/auth/login'.

Frequently Asked Questions about authentication-proxy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent CORS issues with Supabase authentication in Next.js?

To prevent CORS issues with Supabase authentication in Next.js, route all browser-to-backend requests through server-side API proxy routes. This enforces same-origin communication and avoids direct client-side calls to the authentication service.

What is a server-side authentication proxy and when do I need it?

A server-side authentication proxy is a Next.js API route that intercepts browser requests to manage login, logout, and OAuth callbacks. You need it to enhance security by preventing direct client-side access to your authentication backend.

Can I call Supabase Auth directly from my Next.js client components?

No, calling Supabase Auth directly from Next.js client components is forbidden. You must route authentication requests through server-side proxy routes like '/api/auth/login' to ensure same-origin communication and secure session management.

How do I set up OAuth callbacks securely in a Next.js application?

To set up OAuth callbacks securely in Next.js, route the external OAuth initiation and callback requests through dedicated server-side API proxy routes. This ensures the authentication process remains same-origin and mitigates exposure.

Does the authentication proxy approach work without Next.js API routes?

No, the authentication proxy approach requires Next.js API routes to function. These server-side routes are essential for intercepting and proxying the authentication requests to the backend securely.

Why should I use a proxy route instead of direct client-side authentication?

You should use a proxy route instead of direct client-side authentication to enhance security and prevent CORS issues. Proxying enforces same-origin communication, keeping your DaaS backend and Supabase Auth endpoints concealed from the browser.