vanetix/elixir-keycloak

404 when calling Client.me() with Keycloak 4.x

Closed this issue · 0 comments

When using the Client.me() function, the client produces a 404 consistently:

  ....
  def index(conn, %{"code" => code}) do
    %{token: token} = Keycloak.get_token!(code: code)

    c =
      conn
      |> clear_session
      |> put_session(:token, token)

    {result, output} =
      Client.new(token: token)
      |> Client.me()

    c
    |> render_something()
    ....