[GH-ISSUE #1850] How to integrate it with next-intl middlware ? #8944

Closed
opened 2026-04-13 04:11:28 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @issam-seghir on GitHub (Mar 17, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1850

How do you use it with i18 translation like next-intl middlware?
for example, this is my current middleware when using nextjs 14 with next-intl 3.4

export default createMiddleware(routing);

export const config = {
    // Match all pathnames except for
    // - … if they start with `/api`, `/trpc`, `/_next` or `/_vercel`
    // - … the ones containing a dot (e.g. `favicon.ico`)
    matcher: "/((?!api|trpc|_next|_vercel|.*\\..*).*)",
};

Originally created by @issam-seghir on GitHub (Mar 17, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1850 How do you use it with i18 translation like next-intl middlware? for example, this is my current middleware when using nextjs 14 with next-intl 3.4 ```ts export default createMiddleware(routing); export const config = { // Match all pathnames except for // - … if they start with `/api`, `/trpc`, `/_next` or `/_vercel` // - … the ones containing a dot (e.g. `favicon.ico`) matcher: "/((?!api|trpc|_next|_vercel|.*\\..*).*)", }; ```
GiteaMirror added the locked label 2026-04-13 04:11:28 -05:00
Author
Owner

@ItsProless commented on GitHub (Mar 18, 2025):

After some digging, I've found a discussion in the next-intl repo that might help: Discussion

Hope this helps!

<!-- gh-comment-id:2732744592 --> @ItsProless commented on GitHub (Mar 18, 2025): After some digging, I've found a discussion in the next-intl repo that might help: [Discussion](https://github.com/amannn/next-intl/discussions/1613) Hope this helps!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8944