Next.js Version Compatibility and Webpack Integration Issues with FusionAuth in Application
-
Hello FusionAuth community,
We're currently working on integrating FusionAuth with our existing NextJS application. However, we're facing some challenges due to version compatibility issues. Here are the details:Our current setup:
NextJS version: 13.1
Using the Pages Router (not App Router)
Custom webpack configuration for rendering LLM based chat ApplicationThe issue:
We're unable to upgrade to the latest NextJS version due to compatibility issues with our custom webpack configuration.Questions:
-
Does FusionAuth provide any integration options for older NextJS versions (specifically 13.1)?
-
Are there any recommended workarounds or alternative approaches for integrating FusionAuth with our current setup?
-
If upgrading NextJS is the only option, do you have any tips for maintaining compatibility with custom webpack configurations?
Any insights or recommendations would be greatly appreciated. Thank you in advance for your help!
-
-
@aman-c FusionAuth is completely running outside of Next.js. So it all depends on what you are using to make the call to FusionAuth.
My suggestion would be to implement a version of our React SDK
https://fusionauth.io/docs/sdks/react-sdkThen anything clientside that needs details you can use the built in hooks, anything serverside you can use the cookie that sits at
app.at
or for identityapp.idt
.If you have been using our quickstart you are most likely using
next-auth
which could be causing issues with the implementation. We have had a lot of internal discussion about removing this methodology moving forward to simplify our Next.js suggested implementation.You can find out more about our cookies that are set in our Hosted Backend details.
https://fusionauth.io/docs/apis/hosted-backend