实现-在LinkedIn和Forgerock AM之间启用OAuth2.0flow,其中FR AM充当客户端,而LinkedIn是OAuth提供商。
问题-我们正在将"LinkedIn Sign“集成到我们的一个应用程序中,使用OAuth2.0ForgeRock AM作为客户端。现在,Forgerock作为一个客户端,将授权请求端点中的PKCE参数传递给LinkedIn (代码挑战&代码挑战方法),我们将收到授权码和状态参数。但随后检索访问令牌的请求失败,并出现PKCE错误。
日志中的关键信息-
"ERROR: Exception in processing the tree
org.forgerock.openam.auth.node.api.NodeProcessException: Unable to get UserInfo details from provider
at org.forgerock.openam.auth.nodes.oauth.AbstractSocialAuthLoginNode.getUserInfo(AbstractSocialAuthLoginNode.java:338)Caused by: org.forgerock.oauth.OAuthException: Unable to process request. {"error":"access_denied","error_description":"Not enough permissions to access Native PKCE protocol"}
at org.forgerock.oauth.clients.oauth2.OAuth2Client.lambda$mapToJsonValue$0(OAuth2Client.java:126)
at org.forgerock.util.CloseSilentlyFunction.apply(CloseSilentlyFunction.java:53)
at org.forgerock.util.CloseSilentlyFunction.apply(CloseSilentlyFunction.java:29)
at org.forgerock.util.promise.PromiseImpl.lambda$then$6(PromiseImpl.java:374)
at org.forgerock.util.promise.PromiseImpl.handleCompletion(PromiseImpl.java:536)
at org.forgerock.util.promise.PromiseImpl.setState(PromiseImpl.java:577)
at org.forgerock.util.promise.PromiseImpl.tryHandleResult(PromiseImpl.java:258)
at org.forgerock.util.promise.PromiseImpl.handleResult(PromiseImpl.java:208)
at org.forgerock.util.promise.PromiseImpl.lambda$then$6(PromiseImpl.java:374)"LinkedIn应用编程接口参考& OAuth2.0 - https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/consumer/context
P.S. Forgerock AM在使用OAuth2.0 PKCE与Google集成时工作得非常好。
任何帮助都将不胜感激。谢谢。
发布于 2020-11-25 06:49:30
根据微软文档:https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow-native,您需要联系linkedin团队为您启用PKCE,然后PKCE的授权URL也会不同- https://www.linkedin.com/oauth/native-pkce/authorization
https://stackoverflow.com/questions/63241013
复制相似问题