Removed redirect_uri from token call, I'm sticking to the OAuth2.1 draft.

This commit is contained in:
flash 2024-07-20 02:32:40 +00:00
parent 338260a1d8
commit 05dd302866

View file

@ -269,12 +269,6 @@ HTML;
<input type=url name=token_uri required> <input type=url name=token_uri required>
</label> </label>
</div> </div>
<div>
<label>
<span>Redirect URI (GET) (optional):</span>
<input type=url name=redirect_uri>
</label>
</div>
<div> <div>
<label> <label>
<span>Client ID:</span> <span>Client ID:</span>
@ -381,7 +375,6 @@ HTML;
$clientSecret = (string)$content->getParam('client_secret'); $clientSecret = (string)$content->getParam('client_secret');
$code = (string)$content->getParam('code'); $code = (string)$content->getParam('code');
$codeVerifier = (string)$content->getParam('pkce_verifier'); $codeVerifier = (string)$content->getParam('pkce_verifier');
$redirectUri = (string)$content->getParam('redirect_uri');
$auth = (string)$content->getParam('auth'); $auth = (string)$content->getParam('auth');
$headers = []; $headers = [];
@ -401,9 +394,6 @@ HTML;
if($codeVerifier !== '') if($codeVerifier !== '')
$body['code_verifier'] = $codeVerifier; $body['code_verifier'] = $codeVerifier;
if($redirectUri !== '')
$body['redirect_uri'] = $redirectUri;
$body = Tools::shuffleArray($body); $body = Tools::shuffleArray($body);
$response = Tools::fetch($tokenUri, headers: $headers, body: $body); $response = Tools::fetch($tokenUri, headers: $headers, body: $body);