Skip to content

Commit

Permalink
france_connect: Don't check for next url in authorize view
Browse files Browse the repository at this point in the history
It's never used since we don't forward it in JobSeekerLoginView
  • Loading branch information
tonial committed Sep 30, 2024
1 parent 19cf024 commit 3828836
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions itou/openid_connect/france_connect/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,10 @@ def _redirect_to_job_seeker_login_on_error(error_msg, request=None, extra_tags="
return HttpResponseRedirect(reverse("login:job_seeker"))


def get_callback_redirect_uri(request) -> str:
redirect_uri = get_absolute_url(reverse("france_connect:callback"))
next_url = request.GET.get("next")
if next_url:
redirect_uri += f"?next={next_url}"

def france_connect_authorize(request):
# The redirect_uri should be defined in the FC settings to be allowed
# NB: the integration platform allows "http://127.0.0.1:8000/franceconnect/callback"
return redirect_uri


def france_connect_authorize(request):
redirect_uri = get_callback_redirect_uri(request)
redirect_uri = get_absolute_url(reverse("france_connect:callback"))
state = FranceConnectState.save_state()
data = {
"response_type": "code",
Expand Down Expand Up @@ -70,8 +61,7 @@ def france_connect_callback(request):
)
return _redirect_to_job_seeker_login_on_error(error_msg, request)

redirect_uri = get_callback_redirect_uri(request)

redirect_uri = get_absolute_url(reverse("france_connect:callback"))
data = {
"client_id": settings.FRANCE_CONNECT_CLIENT_ID,
"client_secret": settings.FRANCE_CONNECT_CLIENT_SECRET,
Expand Down

0 comments on commit 3828836

Please sign in to comment.