-
Notifications
You must be signed in to change notification settings - Fork 377
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
SERVER_PORT always causes port in redirect URL #403
Comments
@timsmid thank you for this, after upgrading to 1.0.0 we couldn't log in with Okta due to redirect URI mismatch so adding :443 to the allowed URL's in Okta allowed us to work around this bug until your PR is merged. |
Any news on this topic? We're facing this bug as well |
thank you @timsmid ! |
PR merged -> close |
Is there any option to prevent that |
That is exactly the problem that this issue (and PR) solved. The port will be dropped from the redirect URL if it is 443 or 80. See https://github.com/jumbojett/OpenID-Connect-PHP/blob/470895e/src/OpenIDConnectClient.php#L716
Previously, |
Strange, in my case the I have error_log'ed the $port variable, it is
gives That's why Ah, now I see that in my version it is: Case closed. |
When
$_SERVER['SERVER_PORT']
is set, thegetRedirectUrl
method always includes a port number, even when the port is 80 or 443. This is caused by comparing a string ($_SERVER['SERVER_PORT']
) with an integer (80
and443
).I will submit a PR to resolve this issue.
The text was updated successfully, but these errors were encountered: