X Tutup
Skip to content

createAuthUrl output doesn't change after changing setRedirectUri #2171

@nick-van-h

Description

@nick-van-h

Environment details

  • OS: Windows
  • PHP version: 7.4
  • Package name and version: 2.12

Steps to reproduce

  1. See below code example
  2. Validate that createAuthUrl output is the same in both test cases, i.e. $auth_url == $auth_url2

Code example

$redirect_uri = 'https://' . $_SERVER['HTTP_HOST']; //Base url

//Test 1: Set redirect URI for first page
$client->setRedirectUri($redirect_uri.'/test1.php');
$client->setScopes('email');
echo('Validate setting URI 1: '.$client->getRedirectUri());
PHP_EOL;

$auth_url = $client->createAuthUrl();
echo('Generated Auth URL: '.$auth_url);
PHP_EOL;

//Test 2: Set redirect URI for second page
$client->setRedirectUri($redirect_uri.'/test2.php');
echo('Validate setting URI 2: '.$client->getRedirectUri());
PHP_EOL

$auth_url2 = $client->createAuthUrl();
echo('Generated Auth2 URL: '.$auth_url2);

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup