Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to retrieve token {:error, {:bad_body_generator, {:error, :invalid_input, :none}}} #29

Open
sigu opened this issue Dec 10, 2024 Discussed in #28 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@sigu
Copy link

sigu commented Dec 10, 2024

Discussed in #28

Originally posted by sigu December 10, 2024
oidcc_plug version

0.1.2
Erlang version

27.1
Elixir version

1.17.3-otp-27

I am getting the error above from a keycloak local instance.
After inspecting through on these lines, here are the parameters that gets calculated right before requesting for the token:

CODE: "1da4d921-6772-4c2d-b1e6-d23ee593c4ca.84dee313-0256-4663-a434-4747949c52a0.29105a68-a2c5-4a7c-ac6b-770a76eca034"
SCOPE: "openid"
OPTS: %{
  scope: ["openid"],
  redirect_uri: "http://localhost:4010/oidcc/callback",
  request_opts: %{},
  pkce_verifier: :none,
  nonce: :any
}

Here is the error

{:error, {:bad_body_generator, {:error, :invalid_input, :none}}}

I suspect the keycloak server is refusing the :none value and I am not sure which values I can successfully pass

More configs that I have

  1. starting up the worker
        {Oidcc.ProviderConfiguration.Worker,
         %{
           issuer: "http://localhost:7080/realms/master",
           name: MyApp.KeycloakConfigurationProvider,
           provider_configuration_opts: %{
             quirks: %{
               allow_unsafe_http: true,
               document_overrides: %{
                 "token_endpoint_auth_methods_supported" => ["client_secret_basic"],
                 "introspection_endpoint_auth_methods_supported" => ["client_secret_basic"]
               }
             }
           }
  1. keycloak config
    The keycloak client is a confidential client that uses the secret key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants