-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OAuth2 Log-in does not work against League's Oauth2-Server #788
Comments
Hi @SimonBin, |
hi @nook24 , thanks for answer. If I fix this part of the code the SSO seems to work. The attribute mapping might need to be more flexible though. here is the patch I made to oauth2client so it works with our install of simplesamlphp: mail is an array of mails ->
and here the main fix, as I said above I have no idea what the code is supposed to do but simply commenting the offending rewrite it works:
|
Hi @SimonBin, |
I would recommend you test your openITCOCKPIT against simplesamlphp installation, I am currently trying to make it work but running into several issues!
The error message from League is:
I tracked this down to this really odd and awkward code in your custom copy of AbstractProvider:
openITCOCKPIT/app/Vendor/Oauth2/league/oauth2-client/src/Provider/AbstractProvider.php
Lines 635 to 646 in 4132cde
It was introduced in commit e4935f4#diff-62e2083e6ca37dcc429625406b8ee3abR632
It turns a POST request to a POST request with some parameters encoded in the GET parameters. According to League OAuth2 Server / https://www.php-fig.org/psr/psr-7/ / https://github.com/thephpleague/oauth2-server/blob/9fc288ce53bbd198ceb7be604ca00dc3910a7d82/src/Grant/AbstractGrant.php#L488-L496
The POST Request must have the parameters encoded in the POST Body. Thus you are sending non-compliant OAuth2 request and the SSO Login of openITCOCKPIT fails, with a 500 server error in the OAuth2 Server.
openITCOCKPIT only displays
After I fixed that, I am now stuck at the next error: Email address not found.... still investigating this one.
The text was updated successfully, but these errors were encountered: