Replies: 1 comment
-
The NextAuth.js example uses i18n for both public as well as protected pages, you might be interested in the corresponding docs here: Example: Integrating with Auth.js (aka NextAuth.js). I'll move this to a discussion since it seems to be a usage question. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
The problem with the current example with next-auth middleware is that it's not really a use case in the real-world app, unless you just need some admin zone without translations.
The main problem is here:
So you need to choose between 2 middlewares, but usually, you need two at the same time.
Describe the solution you'd like
I would like to have translations inside withAuth() middleware, some combination of 2.
Describe alternatives you've considered
Tried example: https://github.com/amannn/next-intl/tree/main/examples/example-app-router-next-auth
Beta Was this translation helpful? Give feedback.
All reactions