Closed
Description
oidcc version
3.0
Erlang version
27.1
Elixir version
1.17.3-otp-27
Summary
After creating a realm and a client, I keep getting
{:error,
{:http_error, 401,
%{
"error" => "invalid_request",
"error_description" => "Authentication failed."
}}}
when running Oidcc.create_redirect_url(MyApp.OpenIdConfigurationProvider, "test1", client_secret, %{redirect_uri: "http://localhost:8080/oidc/callback"})
.
The openid-configuration is being retrieved successfully.
OpenId Provider: Keycloak 22.0.5
Current behavior
Calling Oidcc.create_redirect_url/4
with a valid client yields:
{:error,
{:http_error, 401,
%{
"error" => "invalid_request",
"error_description" => "Authentication failed."
}}}
How to reproduce
On Keycloak 22.0.5
- Create a realm
- Create a client with:
- Client Authentication: On
- Authorization: On
- Authentication Flow: Standard, Implicit and Direct access grants (all checked)
- Call
Oidcc.create_redirect_url/4
with the client created will yield:
{:error,
{:http_error, 401,
%{
"error" => "invalid_request",
"error_description" => "Authentication failed."
}}}
Expected behavior
Calling Oidcc.create_redirect_url/4
with a valid client:
{:ok, redirect_url} = Oidcc.create_redirect_url(MyApp.OpenIdConfigurationProvider, "test1", client_secret, %{redirect_uri: "http://localhost:8080/oidc/callback"})