NextCloud user_oidc (as RP) with django-oidc-provider (as OP) fails

16 Views Asked by At

My goal is to authenticate NextCloud (v.28.0.2) users against my own Django (v.4.2.7) based web service.

I decided to integrate two "libraies": OpenID Connect Login (v.5.0.1) and django-oidc-provider (v.0.8.2).

Details: Integration starts, "authorize" endpoint seems to work fine but finally (see last line):

INFO 2024-02-29 18:25:23,644 basehttp 142 139883821131456 "GET /oidc/authorize?client_id=989432&response_type=code&scope=openid+email+profile&redirect_uri=https%3A%2F%2Farch.stg.leonarski.pl%2Fapps%2Fuser_oidc%2Fcode&claims=%7B%22id_token%22%3A%7B%22email%22%3Anull%2C%22name%22%3Anull%2C%22quota%22%3Anull%2C%22groups%22%3Anull%7D%2C%22userinfo%22%3A%7B%22email%22%3Anull%2C%22name%22%3Anull%2C%22quota%22%3Anull%2C%22groups%22%3Anull%7D%7D&state=JSEINWUTEKPX53VRYGWSM57JG03RXB6L&nonce=S1Q1SVUP854OIAA05HENUOCXPQBSQ12B HTTP/1.0" 302 0

WARNING 2024-02-29 18:25:24,106 basehttp 142 139883821131456 "GET /oidc/token HTTP/1.0" 405 0

I applied default (I think) settings on both sites and expect "happy end".

Also I tried with another package on Django site (django-oauth-toolkit v.2.3.0) but found the same error:

WARNING 2024-02-29 18:25:24,106 basehttp 142 139883821131456 "GET /oidc/token HTTP/1.0" 405 0

Question: according to resourecs I found, "token" endpoint should be reached with POST method. So why there is a GET request sent from NextCloud? BTW, status code 405 is reasonable here.

Finally, as I belive I'm not the first person worldwide trying this kind of integration then I must be wrong somewhere. But who knows where?

Regards, Dariusz

0

There are 0 best solutions below