Hilfe beim OAuth2 Basic Plugin

Ich habe das OAuth2 Basic-Plugin mit unserer App installiert und konfiguriert, aber ich erhalte die folgende Fehlermeldung und weiß nicht, was los ist:

OAuth2 Debugging: request POST https://formshare.ngrok.io/oauth2/token

Headers: {"User-Agent"=>"Faraday v1.9.3", "Content-Type"=>"application/x-www-form-urlencoded", "Authorization"=>"Basic S2k2SFZtTVpuSTFHUExiRXVlWVJDNENiOkNvb1k0anlQemt3dWNRV21Sa2FWOVNnbHZLbjJFT3cxc3BIMmtMck9yY21vNDM4Tg=="}

Body: {"client_id"=>"Ki6HVmMZnI1GPLbEueYRC4Cb", "client_secret"=>"some_secret", "grant_type"=>"authorization_code", "code"=>"MsWr5INPAYgq9HneriXG4R4ga1rK0lCU3giAMlVTXNQwcW8O", :redirect_uri=>"https://community.formshare.org/auth/oauth2_basic/callback"}

------------------

OAuth2 Debugging: response status 200

From POST https://formshare.ngrok.io/oauth2/token

Headers: {"content-length"=>"239", "content-type"=>"text/html; charset=UTF-8", "date"=>"Mon, 05 Sep 2022 12:56:12 GMT", "ngrok-trace-id"=>"5a6a53d01f2291f686e1cb6944528cc5", "server"=>"gunicorn"}

Body: {"token": {"token_type": "Bearer", "access_token": "freVOb8cHFofdiK58WDFxDhpiVizQpxDdTYypZckOE", "expires_in": 864000}, "header": [["Content-Type", "application/json"], ["Cache-Control", "no-store"], ["Pragma", "no-cache"]], "status": 200}

-----------------------------------
(oauth2_basic) Authentication failure! invalid_credentials: OAuth2::Error, {"token": {"token_type": "Bearer", "access_token": "freVOb8cHFofdiK58WDFxDhpiVizQpxDdTYypZckOE", "expires_in": 864000}, "header": [["Content-Type", "application/json"], ["Cache-Control", "no-store"], ["Pragma", "no-cache"]], "status": 200}

Unsere App verwendet OAuth2 mit Antworttyp = Code. Sie verwendet Python authlib, um alle OAuth2-Ergebnisse zu erzeugen. Erwartet das Plugin etwas anderes als Teil der Token-Antwort?

Ich konnte dieses Problem beheben. Das Problem war, dass unsere OAuth2-App das Token als „text/html; charset=UTF-8“ zurückgab und es „application/json“ sein musste.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.