我有一个express应用程序,我想用keycloak-connect来保护它。我还没有找到任何关于如何在此中间件中使用PKCE设置授权码流的文档或示例。
我想我已经正确配置了密钥罩(IDP),因为应用程序的身份验证失败,因为中间件既不传输code_challenge也不传输code_challenge_method参数,而身份验证服务器拒绝这些参数:
auth_callback
1
error
invalid_request
error_description
Missing parameter: code_challenge_method
state
b720bdf4-daf8-4aa7-8525-be02404396a6中间件配置:
{
realm: 'SomeRealm',
'auth-server-url': 'https://auth-server.url/auth/',
'ssl-required': 'all',
resource: 'Some-client-ID',
'public-client': true,
'confidential-port': 0,
} keycloak-connect甚至有能力利用这种流吗?
发布于 2021-05-11 23:51:58
到目前为止,keycloak-connect不支持PKCE。
请看我在https://keycloak.discourse.group/t/keycloak-connect-node-js-pkce/8285上找到的讨论,有人建议切换到另一个支持PKCE的库(即node-openid-client)
关于服务器配置,我猜您遵循了https://www.keycloak.org/docs/latest/server和关于PKCE的章节,所以应该可以按预期工作。
https://stackoverflow.com/questions/67484525
复制相似问题