Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

middleware.js convention #551

Closed
hi-ogawa opened this issue Jul 12, 2024 · 1 comment
Closed

middleware.js convention #551

hi-ogawa opened this issue Jul 12, 2024 · 1 comment

Comments

@hi-ogawa
Copy link
Owner

hi-ogawa commented Jul 12, 2024

https://nextjs.org/docs/app/api-reference/file-conventions/middleware

It's probably straight-forward. But, I would expect actually integrating things like next-auth is harder.


Probably the hard part is to implement NextResponse.next api?

Indeed, next-auth would need those https://github.com/nextauthjs/next-auth/blob/a3d3d4bab3e037a5359ed22de8b1fff0b5557523/packages/next-auth/src/lib/index.ts#L2-L3

import { headers } from "next/headers.js"
import { NextResponse } from "next/server.js"

Also, our current flight data convention (path)__f.data might cause some trouble with this (cf. #374).

@hi-ogawa
Copy link
Owner Author

Closed by #553

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant