From e7ea700c3dcc380eba283c3068b8132e6683d4a1 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Wed, 24 Jul 2024 16:58:53 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(backend)=20handle=20custom=20redirect?= =?UTF-8?q?=20URL=20while=20login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mozilla-django-oidc now supports a 'returnTo' parameter for redirecting to a specificURL upon successful login. if not provided, it defaults to the settings-defined URL. This allows initiating the login flow from any views, enhancing UX by returning users to their previous page. The 'returnTo' naming can be discussed. --- src/backend/meet/settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/meet/settings.py b/src/backend/meet/settings.py index a43c6012..7a140bc1 100755 --- a/src/backend/meet/settings.py +++ b/src/backend/meet/settings.py @@ -344,6 +344,9 @@ class Base(Configuration): ALLOW_LOGOUT_GET_METHOD = values.BooleanValue( default=True, environ_name="ALLOW_LOGOUT_GET_METHOD", environ_prefix=None ) + OIDC_REDIRECT_FIELD_NAME = values.Value( + "returnTo", environ_name="OIDC_REDIRECT_FIELD_NAME", environ_prefix=None + ) # Video conference configuration LIVEKIT_CONFIGURATION = {