最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

spring boot - NextAuth vs RTK Query in NextJs 14 - Stack Overflow

programmeradmin0浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论