This is an overview of the application: I have a NextJs14 as the frontend and a spring boot for the backend. The backend generates an access token after the login and I configured the frontend to use NextAuth for the authentication using fetch(later I want to integrate with a refresh token as well).
My problem is that I want to use RTK Query for all the other fetching of data in the application and the question would be:
Should I keep using NextAuth for the authentication part or should I use the RTK Query for that as well? If I keep the NextAuth I should get the information from the token and put it in the global state of the application in Redux so I'm concerned if this is considered best practices or a good design.
Thank you for your time.