How to integrate AD B2C into Django Rest Framework
I have been thoroughly reading documentation and code examples on AD B2C, MSAL and other related topics, but I'm having a hard time figuring out how I can integrate AD B2C into the authentication and authorization for my Django Rest Framework backend.
We have a separate Angular SPA that calls the DRF API. The API should check if the request is authenticated and authorized to access it. Quite a common use case. However, the documentation examples and topics on Python only show how to integrate Flask or Django on their own, without an SPA, because Flask and regular Django use server-side rendering of templates.
So how can I make my backend API verify the access token that would come from the frontend with Azure AD B2C? Should I use the MSAL library for this, or should I use an OAuth library that's well integrated into DRF like django-oauth-toolkit? The documentation is very unclear in my opinion.