Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

OAuthAuthenticationHandler extractCredentials: fallback to we can't handle this

Avatar

Avatar
Boost 1
Level 1
maksyms28136728
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
maksyms28136728
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
maksyms28136728
Level 1

27-10-2020

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

authorization_code as a parameter 
http://localhost:4503/content/site/en/welcome.html?code=W8kJTZV9syQJ8JOuPWMTCeP_x2C190y-9CmWehunGpM&state=s5vraqvk34thmc5koifac1kbla

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!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Albin_Issac
MVP

Likes

106 likes

Total Posts

119 posts

Correct Reply

33 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 1
MVP
Albin_Issac
MVP

Likes

106 likes

Total Posts

119 posts

Correct Reply

33 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Albin_Issac
MVP

28-10-2020

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 -

https://github.com/techforum-repo/bundles/blob/master/google-oauth-provider/src/main/java/com/core/o...

https://techforum.medium.com/social-login-with-google-oauth2-adobe-experience-manager-aem-ff33b5c4f3...

Regards

Albin I

www.albinsblog.com

 

Answers (1)

Answers (1)

Avatar

Avatar
Boost 1
Level 1
maksyms28136728
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
maksyms28136728
Level 1

Like

1 like

Total Posts

3 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
maksyms28136728
Level 1

03-11-2020

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