Skip to content

Issue with Claper and OIDC Microsoft Entra ID integration, no_supported_code_challenge #195

@roussidis

Description

@roussidis

While Implementing OIDC with Microsoft Entra Id we're getting the below error regarding the code_challenge.
The issue exists specifically on the latest Claper version 2.3.2.

When we rolled back to 2.3.1 the issue was gone and we were able to login through OIDC.

We're suspecting the issue was introduced through #134 which supports PKCE with OIDC.

9cd4f05f89bc   Parameters: %{"_csrf_token" => "fyg9BB09VQwXHHYtEg93PEABVmcNe_reducted", "_live_referer" => "undefined", "_mounts" => "0", "_track_static" => %{"0" => "https://example.server.com/assets/app.css", "1" => "https://example.server.com/assets/custom.css", "2" => "https://example.server.com/assets/app.js"}, "host" => "example.server.com", "tz" => "Europe/Luxembourg", "vsn" => "2.0.0"}
9cd4f05f89bc 15:29:49.390 request_id=GHr7AdcRdEkwIcMAAAHS [info] GET /users/log_in
9cd4f05f89bc 15:29:49.396 request_id=GHr7AdcRdEkwIcMAAAHS [info] Sent 302 in 5ms
9cd4f05f89bc 15:29:49.402 request_id=GHr7Ade-zXhvZVkAAAHi [info] GET /users/oidc
9cd4f05f89bc 15:29:49.404 request_id=GHr7Ade-zXhvZVkAAAHi [info] Sent 500 in 2ms
9cd4f05f89bc 15:29:49.404 [error] #PID<0.2783.0> running ClaperWeb.Endpoint (connection #PID<0.2782.0>, stream id 1) terminated
9cd4f05f89bc Server: example.server.com:80 (http)
9cd4f05f89bc Request: GET /users/oidc
9cd4f05f89bc ** (exit) an exception was raised:
9cd4f05f89bc     ** (MatchError) no match of right hand side value: {:error, :no_supported_code_challenge}
9cd4f05f89bc         (claper 2.3.2) lib/claper_web/controllers/user_oidc_auth.ex:27: ClaperWeb.UserOidcAuth.new/2
9cd4f05f89bc         (claper 2.3.2) lib/claper_web/controllers/user_oidc_auth.ex:1: ClaperWeb.UserOidcAuth.action/2
9cd4f05f89bc         (claper 2.3.2) lib/claper_web/controllers/user_oidc_auth.ex:1: ClaperWeb.UserOidcAuth.phoenix_controller_pipeline/2
9cd4f05f89bc         (phoenix 1.7.11) lib/phoenix/router.ex:484: Phoenix.Router.__call__/5
9cd4f05f89bc         (claper 2.3.2) lib/claper_web/endpoint.ex:1: ClaperWeb.Endpoint.plug_builder_call/2
9cd4f05f89bc         (claper 2.3.2) lib/claper_web/endpoint.ex:1: ClaperWeb.Endpoint.call/2
9cd4f05f89bc         (plug_cowboy 2.7.2) lib/plug/cowboy/handler.ex:11: Plug.Cowboy.Handler.init/2
9cd4f05f89bc         (cowboy 2.12.0) /app/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
9cd4f05f89bc 15:29:51.049 request_id=GHr7Ajn0qE_JjNEAAAHy [info] GET /
9cd4f05f89bc 15:29:51.055 request_id=GHr7Ajn0qE_JjNEAAAHy [info] Sent 200 in 5ms
9cd4f05f89bc 15:29:51.146 [info] CONNECTED TO Phoenix.LiveView.Socket in 37µs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions