我正在使用 fusionauth 实现 Apostropecms 身份验证。为此,我使用撇号-护照和护照-oauth2 模块。我在必须获取用户信息的流程步骤中遇到问题。我没有通过 /oauth2/userinfo 或 /api/user 从 fusionauth 获取用户信息。
我修改了 passport-oauth2 策略以使其适应 fusionauth 流程。
这是错误:InternalOAuthError: Failed to fetch user profile
我正在使用 fusionauth 实现 Apostropecms 身份验证。为此,我使用撇号-护照和护照-oauth2 模块。我在必须获取用户信息的流程步骤中遇到问题。我没有通过 /oauth2/userinfo 或 /api/user 从 fusionauth 获取用户信息。
我修改了 passport-oauth2 策略以使其适应 fusionauth 流程。
这是错误:InternalOAuthError: Failed to fetch user profile
您可以在验证回调中使用 User API 或 Userinfo 端点。
要调用用户 API ,请按照API JWT 身份验证中所述,将accessToken
传递到验证回调中的参数发送到Authorization
标头中的FusionAuth 。
或者使用Userinfo
示例中描述的端点。