diff --git a/apps/authentication/templates/authentication/face_capture.html b/apps/authentication/templates/authentication/face_capture.html index 6b9a967d2..17574378e 100644 --- a/apps/authentication/templates/authentication/face_capture.html +++ b/apps/authentication/templates/authentication/face_capture.html @@ -39,7 +39,11 @@ let token; function createFaceCaptureToken() { - const csrf = getCookie('jms_csrftoken'); + let prefix = getCookie('SESSION_COOKIE_NAME_PREFIX'); + if (!prefix || [`""`, `''`].includes(prefix)) { + prefix = ''; + } + const csrf = getCookie(`${prefix}csrftoken`); $.ajax({ url: apiUrl, method: 'POST',