Skip to content

Commit

Permalink
Fix typo: change redirectUri to redirectUrl (#27)
Browse files Browse the repository at this point in the history
Example:
https://accounts.salla.sa/oauth2/auth?scope=offline_access&state=9a0e6714a39a8d39597a1c65220614f2&response_type=code&approval_prompt=auto&redirect_url=***&client_id=**

Error:
The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. The 'redirect_url' parameter does not match any of the OAuth 2.0 Client's pre-registered redirect urls.

redirect_url is not a part of Salla's oauth2 parameters. The correct parameter is "redirect_uri".

Other option:
If "redirect_url" is the official parameter, as stated in the docs and other auth tutorials, it could be a bug in the auth endpoint.
https://accounts.salla.sa/oauth2/auth
  • Loading branch information
moqasalem authored Dec 17, 2024
1 parent bd6dce0 commit e41094e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ use Salla\OAuth2\Client\Provider\Salla;
$provider = new Salla([
'clientId' => '{client-id}', // The client ID assigned to you by Salla
'clientSecret' => '{client-secret}', // The client password assigned to you by Salla
'redirectUri' => 'https://yourservice.com/callback_url', // the url for current page in your service
'redirectUrl' => 'https://yourservice.com/callback_url', // the url for current page in your service
]);

/**
Expand Down

0 comments on commit e41094e

Please sign in to comment.