with automated refreshing of access tokens and discussing the pitfalls of useSession() hook (as of Apr 30, 2021)

This is the second part of a two-part series where I show you a way to connect your Django Rest Framework backend with a Next.js + Next-Auth app. If you are looking for the first part in the series where I lay out the basic concepts and write the first part of the code that only deals with obtaining access tokens from the DRF backend to use in the Next.js + Next-Auth client, head over here.

Disclaimer: The pitfalls of the useSession() hook of the next-auth package mentioned in this article is valid at the time of writing, but may…


with a custom Django user model

This is the first part of a two-part series where I show you a way to connect your Django Rest Framework backend with a Next.js + Next-Auth app. If you are looking for the second part in the series where I discuss refresh tokens and common pitfalls of useSession() hook (as of Apr 30, 2021), head over here.

Authentication has always been a gigantic pain in the you-know-where, at least for me. I come from a Node.js, Express.js background, where I used passport.js to handle authentication schemes. I started learning Django and Django Rest Framework (DRF). However, Django (and DRF…

Mahieyin Rahmun

Hi, I am an aspiring Computer Science graduate from Bangladesh who takes interest in Web Development, ML and Automation.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store