https://github.com/clerk/clerk-nextjs-multi-domain-example
https://github.com/clerk/clerk-nextjs-multi-domain-example
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/clerk/clerk-nextjs-multi-domain-example
- Owner: clerk
- Created: 2023-08-09T09:41:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-15T13:18:09.000Z (over 2 years ago)
- Last Synced: 2024-01-15T17:17:22.897Z (over 2 years ago)
- Language: TypeScript
- Size: 101 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clerk Multi Domain Example
This example project shows how to use [Clerk](https://www.clerk.dev/?utm_source=github&utm_medium=starter_repos&utm_campaign=multi-domain) with [Clerk's multi domain feature](https://clerk.com/docs/advanced-usage/satellite-domains).This repo contains two Next.js applications, one for the primary and one for the satellite domain.
[](https://discord.com/invite/b5rXHjAg7A)
[](https://clerk.dev/docs)
[](https://twitter.com/intent/follow?screen_name=ClerkDev)
---
## Pre-requisites
To run the example you need to:
1. Sign up at Clerk.dev.
2. Go to your Clerk dashboard and create an application.
3. Use the Publishable Key and Secret key in both .env
## Set up
1. Install [turbo](https://turbo.build/).
```
npm i -g turbo
```
2. Install dependencies
```
npm install
```
## Development
Build all apps with
```
turbo build
```
Start all apps in development mode
```
turbo dev
```
## Configuration
The following environment variables are supported.
| Name | Type | Description |
| --------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | string | Required. The publishable key for your instance. You can find it in the Clerk dashboard, under API keys. |
| CLERK_SECRET_KEY | string | Required. The instance's secret key. You can find it in the Clerk dashboard, under API keys. |
| NEXT_PUBLIC_CLERK_DOMAIN | string | Required for applications that run on a satellite domain. Set this to ``. |
| NEXT_PUBLIC_CLERK_SIGN_IN_URL | string | Required for applications that run on a satellite domain. This is the primary application's sign in url. Example: `https:///sign-in`. |
| NEXT_PUBLIC_CLERK_IS_SATELLITE | string | Required for applications that run on a satellite domain. Set this to `true`. |