zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
199 stars 138 forks source link

Login to Wordpress "miniOrange OAuth / OpenID Connect Server" fails with HTTP 401 missing_access_token #264

Closed vdietmar closed 3 years ago

vdietmar commented 3 years ago

Hi,

am trying to use Wordpress as a "Custom OAuth2" in Nextcloud 21. As a provider, I am using the "miniOrange OAuth / OpenID Connect Server" plugin in Wordpress.

The general flow seems to work but the last step, getting user info from /wp-json/moserver/resource, returns the following error message:

Signed API request has returned an error. HTTP error 401. Raw Provider API response: {"error":"missing_access_token","error_description":"No Access Token provided"}.

I have tried to inspect that call and have the impression that the Nextcloud Social Login module does indeed not send the access token along with the user info (resource) request.

Is there a way to turn on some kind of logging mode in the Social Login to check this further or has anyone by any chance experienced similar issues before?

vdietmar commented 3 years ago

PS: I already have the following lines in the .htaccess of my Wordpress installation:

RewriteEngine On 
RewriteCond %{HTTP:Authorization} ^(.*) 
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
vdietmar commented 3 years ago

This is solved now. I had my .htaccess wrongly configured and HTTP Auth wasn't making it to Wordpress. I am running into a different issue now, though, for which I will open a new thread,