mint-o-badges / badgr-server

Open Badge issuing and management with Django
GNU Affero General Public License v3.0
2 stars 1 forks source link

server: external OAuth throws error #201

Closed timber-they closed 1 month ago

timber-they commented 1 month ago

Hi all, I just got word from the Klima-Campus people (the ones using our backend via a Moodle plugin) that the OAuth-Credentials does not work anymore (neither on production nor on staging). They also send us the respective error message (see attachments, staging contains some actual information). Have we we changed anything regarding the OAuth-feature for external applications? OEB_Live_Error.txtTXT4KB OEB_Staging_Django_Error.txtTXT26KB timber 3:48 PM

Do you know when was the last time it worked?

The last change to the file that apparently causes the problem (oauth2_api.py) was for the OIDC OAuth stuff on 25th of June. If they did indeed not try it inbetween on Staging, it's probably caused by those changes 3:56 PM

I then assume it's cauesd by the grant_type not being password, oidc or refresh_token. Before the changes this would mean that the response was still handled by the parent method. Since I back then assumed that there were no other grant_types requesting a token, after the changes this would leave response = None, which causes the error (\\'NoneType\\' object has no attribute \\'content\\'). I can fix this, though I don't know for sure if this solves the error, since I don't know how to reproduce it