FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Setting Up NextJS 13 with Auth0 and Sub-Domains: A Guide to Multi-Tenancy Web Apps
How-ToWeb Development

Setting Up NextJS 13 with Auth0 and Sub-Domains: A Guide to Multi-Tenancy Web Apps

via Dev.to TutorialAlex Cloudstar1mo ago

Hi guys! In the article today we'll discuss and also I'll show you how to set up NextJS 13 (with app folder), Auth0 and sub-domains. I'm currently working on a web multi-tenancy app. So we need multiple sub-domains. For security reasons, we decided to use Auth0. We did follow the basic setup for Auth0 which can be found here . And everything worked smoothly and fine. But, we figured out that, we need the multiple sub-domains. So, I started researching, I got into a lot of trouble with this because every time I entered subdomain.domain.com I got an error. Something about err callback, grant_type etc, I can't reproduce the error now, but the status code was 400. Anyway, after a lot of research, a colleague of mine, has found that we need to create our sdk. If you followed the basic quickstart from Auth0 you should have something like // src/api/auth/[auth0]/route.ts export const GET = ( req : NextRequest , res : NextResponse ) => { return handleAuth ()( req , res ); // not neccesary to h

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
14 views

Related Articles

How-To

The Difference between `let`, `var` and `const`

Medium Programming • 2d ago

How-To

Circulation Metrics Framework for Living Systems

Medium Programming • 2d ago

Red Rooms makes online poker as thrilling as its serial killer
How-To

Red Rooms makes online poker as thrilling as its serial killer

The Verge • 2d ago

Don’t Know What Project to Build? Here Are Developer Projects That Actually Make You Better
How-To

Don’t Know What Project to Build? Here Are Developer Projects That Actually Make You Better

Medium Programming • 2d ago

Why Most Developers
Stay Broke
How-To

Why Most Developers Stay Broke

Medium Programming • 2d ago

Discover More Articles