Hi, I use Slim with thephpleague/oauth2-server and can not get the query params correct.
I have a ServerRequestInterface $request variable, when I use json_encode($request->getQueryParams()) I get this result:
Also make sure that your server is properly configured and that there are no additional custom URL rewriting rules that might interfere with the query parameter handling.
P.S. the PHP $_GET variable is correct: {“response_type”:“code”,“client_id”:“myclient”,“redirect_uri”:“localhost”,“state”:“1”}
but oauth2-server uses getQueryParams and don’t work properly…
It seems that the “amp;” prefix is being added to each query parameter, which is not expected behavior. I guess the problem is somewhere in the request handling process, these entities are not being properly decoded. Can you provide more details, such as the installed PSR-7/PSR-15 packages and other installed Middlewares?
Ok, it work now. That was a conflict with WHMCS (I built it as a WHMCS module). Composer somehow used the modules from the WHMCS vendor directory. If I separate that from WHMCS then it works.