


Hi,
I've implemented a custom OAuth Provider and API.
So currently AEM redirects to OAuth form, and after successful login user is redirected back to AEM with
The problem is that OAuthAuthenticationHandler doesn't see authorization_code as a request param:
com.adobe.granite.auth.oauth.impl.OAuthAuthenticationHandler extractCredentials: fallback to we can't handle this
as a result, there is the following error in logs:
com.adobe.granite.auth.oauth.impl.helper.OauthTokenManager token not found in request attribute or cookie for:customOAuth
Why code param is not visible for OAuthAuthenticationHandler? How could it be debugged to understand the root cause of this issue?
Thank you in advance!
Solved! Go to Solution.
Views
Replies
Total Likes
Are you using JsonTokenExtractor?
Login form should redirect to url that ends with "/callback/j_security_check"
that triggers AEM code to make an additional call to OAuth service to get Access Token
Refer to the below URL for more detail -
Regards
Albin I
Are you using JsonTokenExtractor?
Login form should redirect to url that ends with "/callback/j_security_check"
that triggers AEM code to make an additional call to OAuth service to get Access Token
Refer to the below URL for more detail -
Regards
Albin I
Hi Albin,
Thanks for response!
I am not using JsonTokenExtractor. I followed same link that you provided.
From the logs i see that AEM tries to find authorization_code in request before request comes back from OAuth login page.
so log looks like this:
com.adobe.granite.auth.oauth.impl.helper.OauthTokenManager token not found in request attribute or cookie for:custom_config
GET /content/redirect/path.html?code=CodeFromTheOAuth&state=some_state HTTP/1.1
Views
Replies
Total Likes
I found the issue.
Login form should redirect to url that ends with "/callback/j_security_check"
that triggers AEM code to make an additional call to OAuth service to get Access Token