Update PayPal social login flow to use 127.0.0.1 instead of localhost (#23532)
Signed-off-by: Tomas Ondrusko <tondrusk@redhat.com>
This commit is contained in:
parent
56082cdd2d
commit
3d42573813
2 changed files with 10 additions and 1 deletions
|
@ -1475,6 +1475,10 @@ public class OAuthClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLoginFormUrl() {
|
public String getLoginFormUrl() {
|
||||||
|
return this.getLoginFormUrl(this.baseUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLoginFormUrl(String baseUrl) {
|
||||||
UriBuilder b = OIDCLoginProtocolService.authUrl(UriBuilder.fromUri(baseUrl));
|
UriBuilder b = OIDCLoginProtocolService.authUrl(UriBuilder.fromUri(baseUrl));
|
||||||
if (responseType != null) {
|
if (responseType != null) {
|
||||||
b.queryParam(OAuth2Constants.RESPONSE_TYPE, responseType);
|
b.queryParam(OAuth2Constants.RESPONSE_TYPE, responseType);
|
||||||
|
|
|
@ -516,7 +516,12 @@ public class SocialLoginTest extends AbstractKeycloakTest {
|
||||||
|
|
||||||
private void navigateToLoginPage() {
|
private void navigateToLoginPage() {
|
||||||
currentSocialLoginPage.logout(); // try to logout first to be sure we're not logged in
|
currentSocialLoginPage.logout(); // try to logout first to be sure we're not logged in
|
||||||
driver.navigate().to(oauth.getLoginFormUrl());
|
|
||||||
|
driver.navigate().to(
|
||||||
|
currentTestProvider.equals(PAYPAL)
|
||||||
|
? oauth.getLoginFormUrl("https://127.0.0.1:8543/auth")
|
||||||
|
: oauth.getLoginFormUrl()
|
||||||
|
);
|
||||||
loginPage.clickSocial(currentTestProvider.id());
|
loginPage.clickSocial(currentTestProvider.id());
|
||||||
|
|
||||||
// Just to be sure there's no redirect in progress
|
// Just to be sure there's no redirect in progress
|
||||||
|
|
Loading…
Reference in a new issue