diff --git a/components/org.wso2.carbon.identity.application.authenticator.oidc/src/main/java/org/wso2/carbon/identity/application/authenticator/oidc/OpenIDConnectAuthenticator.java b/components/org.wso2.carbon.identity.application.authenticator.oidc/src/main/java/org/wso2/carbon/identity/application/authenticator/oidc/OpenIDConnectAuthenticator.java index fbb46109..cc4f91bf 100644 --- a/components/org.wso2.carbon.identity.application.authenticator.oidc/src/main/java/org/wso2/carbon/identity/application/authenticator/oidc/OpenIDConnectAuthenticator.java +++ b/components/org.wso2.carbon.identity.application.authenticator.oidc/src/main/java/org/wso2/carbon/identity/application/authenticator/oidc/OpenIDConnectAuthenticator.java @@ -310,7 +310,7 @@ protected String getCallbackUrl(Map authenticatorProperties) { protected String getCallbackUrl(Map authenticatorProperties, AuthenticationContext context) { if (Boolean.parseBoolean((String) context.getProperty(IS_API_BASED))) { - return (String) context.getProperty(REDIRECT_URL); + return resolveCallBackURLForAPIBasedAuthFlow(context) } String callbackUrl = authenticatorProperties.get(IdentityApplicationConstants.OAuth2.CALLBACK_URL); if (StringUtils.isBlank(callbackUrl)) {