Next.js Discord

Discord Forum

NextAuth, AppDirectory and handling RefreshAccessTokenError

Unanswered
PepeW posted this in #help-forum
Open in Discord
I've successfully implemented NextAuth in my project and everything is working fine.
I'm now adding a refresh token rotation so I've been following this guide: https://authjs.dev/guides/basics/refresh-token-rotation

At the end of the guide it's written that we have to handle the RefreshAccessTokenError at the root of the app in the client side.
But working with AppDirectory, is it possible to handle this error in the RootLayout with a getServerSession() instead ?

0 Replies