Use django-allauth in headless mode with nextjs and other frontend frameworks.
allauth-js is GPLv3 licensed and completely free for open-source use on codebases with compliant licenses.
For commercial closed source use, we have a simple, low-cost, one-off payment perpetual license to help support the cost of maintaining open-source software. Go through the payment process and we'll send a filled out license.
For other license options (eg you want to redistribute or use in open-source but non GPL-compatible projects) please contact us.
Of course, you could just steal it (AIs probably already have). Consider your karma - the cost of the paid option is barely noise to any commercial business.