Skip to content
New Project

Auth for subdomains

Learn how to secure sub domains using Next.js and NextAuth.

DeployView Demo
Learn how to secure sub domains using Next.js and NextAuth.
  • solutions-subdomain-auth.vercel.sh (login from here)
  • subdomain.solutions-subdomain-auth.vercel.sh

Features

  • Secure sub domains

How to Use

You can choose from one of the following two methods to use this repository:

Clone and Deploy

Download this repository via git:

git clone https://github.com/vercel/examples.git

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example https://github.com/vercel/examples/tree/main/solutions/subdomain-auth subdomain-auth
# or
yarn create next-app --example https://github.com/vercel/examples/tree/main/solutions/subdomain-auth subdomain-auth

Deploy it to the cloud with Vercel (Documentation).

GitHub
Ownervercel
Repositoryexamples
Use Cases
Authentication
Multi-Tenant Apps
Stack
Next.js
Tailwind
Auth
NextAuth.js

Related Templates

Basic Auth Password Protection

Password protect pages in your application using Edge Middleware.
Basic Auth Password Protection thumbnail
DeployView Demo