snok / django-auth-adfs

A Django authentication backend for Microsoft ADFS and AzureAD
http://django-auth-adfs.readthedocs.io/
BSD 2-Clause "Simplified" License
270 stars 97 forks source link

Azure Active Directory AADSTS54005 error issue #245

Open dg1980 opened 1 year ago

dg1980 commented 1 year ago

We launched the application as Azure App Service. We set it up as recommended in the manual. The application has been working properly for about 2 months. "AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token" occured recently. The same configuration works in a local environment without issues. Configuration looks correct. We tried different App Service settings but nothing worked. We'll be grateful for help.

Fund with Polar

dcleveng commented 1 year ago

I've seen the above error as well along with "AADSTS70008: The provided authorization code or refresh token has expired due to inactivity." We didn't see either of these errors when using on prem ADFS, but we are now using Azure. You can track these back to a specific sign-in log entry in Azure using the Correlation ID and identify exactly the user/details.

I haven't heard of issues from end users, and following some of the specific user accounts that have thrown these errors, it still seems like they are able to get logged in.