Skip to content

Commit

Permalink
Fallback to connection for code
Browse files Browse the repository at this point in the history
Hacky fallback because SAML does not require a code to be sent in the
authentication flow.
  • Loading branch information
RichDom2185 committed Dec 8, 2023
1 parent 5c7187c commit dd4962d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cadet_web/controllers/auth_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ defmodule CadetWeb.AuthController do
}
) do
# Code is optional as SAML flow is mainly handled by backend
code = Map.get(params, "code")
# FIXME: HACKY fallback for SAML (because no code is needed)
code = Map.get(params, "code", conn)
client_id = Map.get(params, "client_id")
redirect_uri = Map.get(params, "redirect_uri")

Expand Down

0 comments on commit dd4962d

Please sign in to comment.