Seems like something pretty basic to implement, but I've been struggling for several days with it now.
Essentially:
- User navigates to domain.com/admin
- This URI is for internal company users only
- Thus, the user needs to be verified against the organizations Azure AD
- If they are a user, it takes them to the dashboard; If not, they are rejected from entering
Simple, right?
I'm finding not so much.
I've been trying to do it server-side with DRF. Mind you, my Django backend, does not serve any static assets. It is strictly and API that consumes and provides data. It at no point uses Django Templates. I'm finding most of the libraries are out dated, have poorly written documentation, or just don't work for my use case (DRF). I've tried a handful and can't get any of them working.
I understand that this can also be done client-side with ReactJS libraries and supposedly it is secure. I haven't tried yet. I have no preference for either server-side or client-side just as long as user's information can be put in the database... I don't see any reason why this couldn't happen even using client-side.
So at any rate, what I'm hoping I can get some guidance on is the following:
- Some documentation, or guide, starting with the basics: How to properly register this App to serve this purpose (i..e, client_id, client_secret, token, etc.). Super clear and from the basics.
- What actually works for this purpose whether it is client-side ReactJS or vanilla JavaScript implementation, or server-side Django, DRF, or Python implementation.
Thanks in advance for the help.