Resource Center

Engineering

Stay updated with the latest best practices, product updates, and expert tips on building secure, seamless user experiences with Authgear.

HTTP 401 Unauthorized: What It Means and How to Fix It
Engineering

HTTP 401 Unauthorized: What It Means and How to Fix It

A 401 Unauthorized error means the request lacks valid authentication. Here is what causes it, how it differs from 403, and how to fix it for OAuth, JWT, Basic Auth, and API key flows.

May 6, 2026
HTTP 403 Forbidden: What It Means and How to Fix It
Engineering

HTTP 403 Forbidden: What It Means and How to Fix It

A 403 Forbidden error means the server understood your request but refuses to fulfil it. Here is what causes it and how to fix it on Nginx, Apache, Cloudflare, and AWS.

May 6, 2026
HTTP 504 Gateway Timeout: What It Means and How to Fix It
Engineering

HTTP 504 Gateway Timeout: What It Means and How to Fix It

A 504 Gateway Timeout means a proxy waited too long for a response from the upstream server. Here is what causes it, how it differs from 502, and how to fix it on Nginx, Cloudflare, and AWS.

May 6, 2026
Supabase Auth vs Authgear for Next.js: Which Should You Choose?
Engineering

Supabase Auth vs Authgear for Next.js: Which Should You Choose?

Supabase Auth and Authgear are both production-ready for Next.js App Router — but they take fundamentally different approaches to authentication. This guide gives you a fair, practical comparison with a feature table, setup code for both, and clear guidance on when to choose each.

Mar 27, 2026
Next.js Session Management: Cookies, JWTs, and Server Sessions (2026)
Engineering

Next.js Session Management: Cookies, JWTs, and Server Sessions (2026)

Next.js session management is more nuanced than in a traditional server-rendered app. This guide covers stateful vs stateless sessions, secure cookie attributes, JWT signing with jose, token rotation, sliding sessions, and how to read session data across Server Components, Route Handlers, and Middleware.

Mar 27, 2026
Next.js Authentication: Complete Guide for App Router (2026)
Engineering

Next.js Authentication: Complete Guide for App Router (2026)

The App Router moves authentication to the server by default — but "moved to the server" doesn't mean "solved." This guide covers the full picture, from picking the right approach to writing your first protected Server Component, with working TypeScript code throughout.

Mar 27, 2026
Next.js API Route Authentication: How to Secure Your Endpoints
Engineering

Next.js API Route Authentication: How to Secure Your Endpoints

API routes in Next.js work differently from page protection — Route Handlers must return HTTP status codes, not redirects. This guide covers session cookies, Bearer tokens, RBAC, and Server Actions with complete TypeScript examples.

Mar 25, 2026
Next.js Security Best Practices (2026)
Engineering

Next.js Security Best Practices (2026)

Next.js has grown from a simple React framework into a full-stack platform — and with that power comes a wider attack surface. The App Router, Server Components, and Server Actions mean your authentication logic, database queries, and business rules all live in the same codebase as your UI.

Mar 25, 2026
Next.js Middleware Authentication: Protect Routes in App Router
Engineering

Next.js Middleware Authentication: Protect Routes in App Router

Learn how Next.js middleware works, how to configure the matcher, validate JWTs at the edge, and redirect unauthenticated users — with the CVE-2025-29927 bypass covered.

Mar 25, 2026
How to Add JWT Authentication to Next.js App Router (2026)
Engineering

How to Add JWT Authentication to Next.js App Router (2026)

Learn how to add JWT authentication to Next.js App Router — the right way. Covers httpOnly cookie storage, edge middleware with jose, and accessing JWT claims in Server Components.

Mar 20, 2026
How Much Does Two-Factor Authentication Cost? A 2026 Pricing Guide
Engineering

How Much Does Two-Factor Authentication Cost? A 2026 Pricing Guide

2FA isn't a single price — SMS OTP, WhatsApp OTP, TOTP, and passkeys have very different cost structures. Here's what each method actually costs at every scale.

Mar 17, 2026
What Is an SMS Pumping Attack? How to Detect and Prevent SMS Toll Fraud
Engineering

What Is an SMS Pumping Attack? How to Detect and Prevent SMS Toll Fraud

SMS pumping fraud is when bots flood your OTP endpoint with fake requests to premium-rate numbers — and you foot the bill. Here's how it works, how to detect it, and how to stop it.

Mar 17, 2026
Node.js Security Best Practices for Authentication
Engineering

Node.js Security Best Practices for Authentication

Authentication is the front door to your application — and in Node.js, getting it wrong is easier than you'd think. This guide walks through the Node.js security best practices every developer should follow when building or auditing an auth system.

Mar 13, 2026
HTTP 502 Bad Gateway: What It Means and How to Fix It
Engineering

HTTP 502 Bad Gateway: What It Means and How to Fix It

A 502 Bad Gateway error means the server acting as a gateway or proxy received an invalid response from an upstream server. Here is what causes it and how to fix it.

Mar 13, 2026
Webhooks vs APIs: What's the Difference?
Engineering

Webhooks vs APIs: What's the Difference?

Most products today integrate with payment platforms, identity providers, messaging services, and analytics tools. Two communication models power the majority of these integrations: APIs and webhooks.

Mar 13, 2026
How To Implement Passkeys with WebAuthn: Complete Developer Guide
Engineering

How To Implement Passkeys with WebAuthn: Complete Developer Guide

A practical developer guide to passkey authentication and WebAuthn. Covers how passkeys work, registration and login flows, JavaScript code examples, best practices, and testing tips.

Mar 13, 2026
What Is .well-known/openid-configuration? A Developer's Guide
Engineering

What Is .well-known/openid-configuration? A Developer's Guide

Learn what .well-known/openid-configuration is, what every field in the discovery document means, and how to fetch it for Google, Okta, Azure, Keycloak, or your own OIDC provider.

Mar 5, 2026
SSL vs TLS: What's the Difference and Why It Matters
Engineering

SSL vs TLS: What's the Difference and Why It Matters

SSL is deprecated and TLS is what your server actually uses — but why does everyone still call it SSL? Learn the history, the attacks that killed SSL, and what changed.

Mar 5, 2026
What Is an SSL Certificate? A Developer's Guide
Engineering

What Is an SSL Certificate? A Developer's Guide

An SSL certificate does two things: encrypts your connection and verifies your server's identity. Learn how it works, the 3 certificate types, and what's inside one.

Mar 5, 2026
SSL Certificate Chain: What It Is and How to Fix It
Engineering

SSL Certificate Chain: What It Is and How to Fix It

A missing intermediate certificate is the most common SSL misconfiguration. Learn what a certificate chain is and how to fix a broken one on Nginx, Apache, or Caddy.

Mar 5, 2026
Passwordless Authentication: Magic Links vs Passkeys vs OTP
Engineering

Passwordless Authentication: Magic Links vs Passkeys vs OTP

Passwords are one of the biggest security liabilities in modern software. Passwordless authentication replaces them with magic links, passkeys, and OTPs—methods that are faster, easier, and harder to compromise. This guide explains how each works, when to use them, and what to watch for during implementation.

Feb 24, 2026
OAuth 2.0 Security Best Practices: PKCE, State Parameters & More
Engineering

OAuth 2.0 Security Best Practices: PKCE, State Parameters & More

OAuth 2.0 is a widely adopted framework that lets applications access user resources safely, without ever exposing passwords or credentials. This guide breaks down OAuth 2.0 security in practical terms—covering PKCE, state parameters, token management, and more—to help you build secure, production-ready authorization systems.

Feb 24, 2026
JWT Security Explained: Best Practices and Common Vulnerabilities
Engineering

JWT Security Explained: Best Practices and Common Vulnerabilities

JSON Web Tokens (JWTs) are widely used for authentication and authorization because they let systems verify requests without relying on centralized session storage. This guide explains JWT security in practical terms—covering how they work, common vulnerabilities, and best practices for using them safely in production.

Feb 24, 2026
Generating IDs In Distributed Systems: Why UUIDv7 Beats Centralized ID Services
Engineering

Generating IDs In Distributed Systems: Why UUIDv7 Beats Centralized ID Services

Learn why UUIDv7 is a better choice than centralized ID services in distributed systems. Explore scalability, performance, ordering, and operational trade-offs.

Feb 12, 2026