Implementing Authentication in Next.js v13 Application with Keycloak(Part — 2)
In the last article, I have discussed about bootrsapping keycloak server along with a basic setup of nextjs with next-auth. In this subsequent article, our focus will shift to configuring next-auth to enhance the user experience while keeping a security-first approach. A. Bootstrapping keycloak server B. Setting up nextjs along with next-auth C. Refreshing access tokens D. Federated logout E. Securing pages with middleware F. Customising sign in and sign out routes (A & B was discussed in the last part, we will discuss C–F in this part) By default next-auth uses JWT session strategy....
Read







