diff --git a/jans-auth-server/client/src/test/java/io/jans/as/client/BaseTest.java b/jans-auth-server/client/src/test/java/io/jans/as/client/BaseTest.java index a0e14c49891..c2bd69eddde 100644 --- a/jans-auth-server/client/src/test/java/io/jans/as/client/BaseTest.java +++ b/jans-auth-server/client/src/test/java/io/jans/as/client/BaseTest.java @@ -456,7 +456,7 @@ private WebElement waitForRequredElementLoad(WebDriver currentDriver, String id) protected String acceptAuthorization(WebDriver currentDriver, String redirectUri) { String authorizationResponseStr = currentDriver.getCurrentUrl(); - if (authorizationResponseStr.contains("code=") || authorizationResponseStr.contains("access_token=")) { + if ((authorizationResponseStr.contains("code=") || authorizationResponseStr.contains("access_token=")) && !authorizationResponseStr.contains("user_code")) { return authorizationResponseStr; }