next-intl
next-intl copied to clipboard
Change from NextAuth v4 syntax to v5 syntaxes
Here's initial draft of pull request. Apologies for format issues.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
next-intl-example-next-13 | ❌ Failed (Inspect) | Nov 3, 2023 3:22pm |
@JulianJorgensen is attempting to deploy a commit to the next-intl Team on Vercel.
A member of the Team first needs to authorize it.
Apparently, this does not work anymore
const authMiddleware = auth(
(req) => intlMiddleware(req),
{
callbacks: {
authorized: ({token}) => token != null
},
pages: {
signIn: '/login'
}
}
);
I'm having issues with this... any ideas?
I got this working using this workaround. This is necessary due to a bug in next-auth
itself. So this may need to be parked until that bug is resolved.
@ScreamZ shared his implementation here: https://github.com/amannn/next-intl/discussions/1170. Might be worth checking that out when we continue with this PR.
Also https://github.com/amannn/next-intl/pull/899 provides a potential implementation.
For context, I didn't look further into this yet as I'm waiting for Auth.js v5 stable to be released. I'd like to avoid keeping up to date with their beta versions, as long as the API might still change.
Many thanks to everyone who has already looked into this and provided help! 🙌