Use Case Guide

Test Auth Middleware

Ensure your security logic is watertight. Test how your middleware handles expired sessions, missing tokens, and incorrect roles.

The Problem

Middleware logic is hard to test interactive because it happens before a page even loads, making it difficult to 'inspect' its variables.

The DevConsole Solution

DevConsole logs the headers and cookies sent to your middleware and any 'Internal-Redirect' headers it sends back.

Step-by-Step Implementation

Clear Auth Cookies

Use the cookie manager to quickly wipe your session and navigate to a protected page.

Modify Identity Tokens

Edit your JWT or session string to have 'user' role instead of 'admin' and refresh.

Monitor the Redirect

Ensure the middleware correctly bounces the request to /login or /unauthorized.

Related Questions

Does it support Next.js middleware.ts?

Yes! It's specifically optimized for Next.js and Remix middleware patterns.

Can I see 'rewrite' behavior?

Yes, DevConsole identifies when a request was rewritten internally by your server.

Start Debugging Smarter

DevConsole is free during development. Join 5,000+ developers shipping better code.

Get Started Now