Open a-kuchinski opened 1 month ago
Have you taken a look at the JWT without verifying the signature to confirm it looks correct? You can do so by disabling the verify_
aspects here: https://github.com/snok/django-auth-adfs/blob/378f14129d774ac035804e09f7b6a1b3f5a3f71f/django_auth_adfs/backend.py#L128
There may be another call you need to make. The goal here isn't to avoid the error by disabling the checks, but to understand what is being sent so you can make changes to get things to work appropriately.
I've been trying to configure my Django REST Framework app to use django-auth-adfs for Microsoft Entra ID (former Azure AD B2C), but I have an error with signature verification.
Prior to test oauth2/login page, I tried the example listed in this page
https://django-auth-adfs.readthedocs.io/en/latest/rest_framework.html
with a few additions to make it work with Microsoft Entra:
And the auth works in this case, I successfully getting the
access_token
and using it to call my app endpointhttp://localhost:8000/api/contract
.However, when i'm trying to authorize within my api in the Chrome browser via
oauth2/login
, I keep getting[django_auth_adfs:157] Error decoding signature: Signature verification failed
error.Here is ADFS config in my DRF app settings.py
urls.py
I also tried to change urls to path('oauth2/', include('django_auth_adfs.drf_urls')),
as suggested in the docs. But it cause a backend error
django.urls.exceptions.NoReverseMatch: 'django_auth_adfs' is not a registered namespace`.Upvote & Fund