8000 Oidcc.create_redirect_url/4 returning "invalid_request" "Authentication failed." · Issue #391 · erlef/oidcc · GitHub
  • [go: up one dir, main page]
    More Web Proxy on the site http://driver.im/
    Skip to content
    Oidcc.create_redirect_url/4 returning "invalid_request" "Authentication failed." #391
    Closed
    @GPrimola

    Description

    @GPrimola

    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

    1. Create a realm
    2. Create a client with:
      • Client Authentication: On
      • Authorization: On
      • Authentication Flow: Standard, Implicit and Direct access grants (all checked)
    3. 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"})

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Type

      No type

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        0