How to add Clerk authentication provider to a Next.js 13 app with multiple root layout files
Unanswered
Western thatching ant posted this in #help-forum
Western thatching antOP
I am using Clerk for authentication and want to add the Clerk provider, but on the Clerk docs there is only the option to add the provider to a Next.js app with just one root layout.jsx(/.tsx) file. How do I add Clerk authentication provider to a Next.js 13 app with multiple root layout.jsx files?
Please note I do not have parent and children layout. Just multiple root layouts.
The file and folder tree looks something like this:
src
└── app
├── (admin)
│ ├── bets
│ ├── dashboard
│ ├── deposits
│ ├── withdrawals
│ └── layout.jsx
├── (auth)
│ ├── login
│ ├── register
│ └── layout.jsx
└── (marketing)
├── layout.jsx
└── page.jsx
Please note I do not have parent and children layout. Just multiple root layouts.
The file and folder tree looks something like this:
src
└── app
├── (admin)
│ ├── bets
│ ├── dashboard
│ ├── deposits
│ ├── withdrawals
│ └── layout.jsx
├── (auth)
│ ├── login
│ ├── register
│ └── layout.jsx
└── (marketing)
├── layout.jsx
└── page.jsx
1 Reply
Cape lion
Is your goal to support multiple tenants (user roles)?