Middleware doesn't run in root directory
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- nextjs
- Domain
- documentation
Research direction
Review the linked Supabase Auth Next.js server-side documentation and its middleware placement guidance. Verify the documented behavior for Next.js 14 through 15, especially projects using a src directory, and update the page so the middleware location is unambiguous. Done means the instructions match the shown project structure and avoid the reported authentication errors.
Written by the indexing model from the issue text.
Description
Improve documentation
Link
[
Add a link to the page which needs improvement (if relevant)]
(https://supabase.com/docs/guides/auth/server-side/nextjs?queryGroups=router&router=app)
Describe the problem
middleware doesn't run in root_folder/middleware.ts for next js 14 to 15
the middleware.ts file should be in
src/middleware.ts for at least nextjs 14 to 15
/my-next-app
├─ src/
│ ├─ middleware.js <-- here
│ └─ app/
├─ next.config.js
└─ package.json
not root/middleware.ts this causes all sorts of authentication errors
- Dominant language
- TypeScript
- Stars
- 207
- Forks
- 32
- Avg merge
- 14h 56m
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/ssr
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
documentation stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
documentation stale
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
documentation stale
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100