From 9c19da6499a31320d07d60fb43a7c0604b68e57d Mon Sep 17 00:00:00 2001 From: Pedro Felix Date: Fri, 19 Dec 2025 09:38:03 +0000 Subject: [PATCH 1/5] IS-9422: adds template to evaluate browser context needed for BankID returnURL computation on the backend --- .../compute-browser-context.vm | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/identity-server/templates/core/authenticator/bankid/enter-personalnumber/compute-browser-context.vm diff --git a/src/identity-server/templates/core/authenticator/bankid/enter-personalnumber/compute-browser-context.vm b/src/identity-server/templates/core/authenticator/bankid/enter-personalnumber/compute-browser-context.vm new file mode 100644 index 00000000..13278c10 --- /dev/null +++ b/src/identity-server/templates/core/authenticator/bankid/enter-personalnumber/compute-browser-context.vm @@ -0,0 +1,27 @@ +#* + * Copyright (C) 2025 Curity AB. All rights reserved. + * + * The contents of this file are the property of Curity AB. + * You may not copy or use this file, in either source code + * or executable form, except in compliance with terms + * set by Curity AB. + * + * For further information, please contact Curity AB. + *### + +## redirect to the same URL +#set ($_callbackUrl = "") +## using a GET +#set ($_callbackMethod = "get") +#define($_formContent) + ## providing 'navigator.maxTouchPoints' in the 'nmtp' query-string variable + + + + ## just to ensure the query-string is not empty and we do not endup on an infinit loop + +#end +#parse("layouts/redirect") From 1db54cee9ef3f2098fac9e1cbb17f75212f35322 Mon Sep 17 00:00:00 2001 From: Pedro Felix Date: Wed, 15 Apr 2026 21:08:15 +0100 Subject: [PATCH 2/5] IS-9422: updates templates to support same-device and cross-device flows --- .../en/authenticator/bankid/launch.properties | 4 +++ .../authenticator/bankid/launch.properties | 4 +++ .../pt/authenticator/bankid/launch.properties | 4 +++ .../sv/authenticator/bankid/launch.properties | 4 +++ .../core/authenticator/bankid/launch/index.vm | 30 ++++++++++--------- .../fragments/bankid/bankid-app-launcher.vm | 1 + 6 files changed, 33 insertions(+), 14 deletions(-) diff --git a/src/identity-server/messages/core/en/authenticator/bankid/launch.properties b/src/identity-server/messages/core/en/authenticator/bankid/launch.properties index c13d262f..06f9f211 100644 --- a/src/identity-server/messages/core/en/authenticator/bankid/launch.properties +++ b/src/identity-server/messages/core/en/authenticator/bankid/launch.properties @@ -39,6 +39,10 @@ launch.view.or=OR launch.view.scan=Scan the code in BankID security app launch.view.button.this-device=Start your BankID app on this device launch.view.button.manualstart=Start your BankID app +launch.view.button.show-qr-code=Show QR code +launch.view.button.open-on-this-device=Open BankID on this device +launch.view.show-qr-code=Show QR code +launch.view.open-on-this-device=Open BankID on this device launch.view.button.cancel=Cancel launch.view.button.continue=Continue launch.validation.error.autostarttoken.required=Missing input. Retry the request diff --git a/src/identity-server/messages/core/pt-pt/authenticator/bankid/launch.properties b/src/identity-server/messages/core/pt-pt/authenticator/bankid/launch.properties index 3ebf32fe..61a1b3ef 100644 --- a/src/identity-server/messages/core/pt-pt/authenticator/bankid/launch.properties +++ b/src/identity-server/messages/core/pt-pt/authenticator/bankid/launch.properties @@ -39,6 +39,10 @@ launch.view.or=OU launch.view.scan=Digitalize o código no aplicativo de segurança BankID launch.view.button.this-device=Iniciar o aplicativo de segurança BankID neste dispositivo launch.view.button.manualstart=Iniciar o aplicativo de segurança BankID +launch.view.button.show-qr-code=Mostrar código QR +launch.view.button.open-on-this-device=Abrir BankID neste dispositivo +launch.view.show-qr-code=Mostrar código QR +launch.view.open-on-this-device=Abrir BankID neste dispositivo launch.view.button.cancel=Cancelar launch.validation.error.autostarttoken.required=Entrada ausente. Tente novamente a solicitação launch.view.poll.continue=Se você não for redirecionado automaticamente, clique aqui para continuar autenticando diff --git a/src/identity-server/messages/core/pt/authenticator/bankid/launch.properties b/src/identity-server/messages/core/pt/authenticator/bankid/launch.properties index 06d5529b..f7a88f39 100644 --- a/src/identity-server/messages/core/pt/authenticator/bankid/launch.properties +++ b/src/identity-server/messages/core/pt/authenticator/bankid/launch.properties @@ -39,6 +39,10 @@ launch.view.or=OU launch.view.scan=Digitalize o código no aplicativo de segurança BankID launch.view.button.this-device=Iniciar o aplicativo de segurança BankID neste dispositivo launch.view.button.manualstart=Iniciar o aplicativo de segurança BankID +launch.view.button.show-qr-code=Mostrar código QR +launch.view.button.open-on-this-device=Abrir BankID neste dispositivo +launch.view.show-qr-code=Mostrar código QR +launch.view.open-on-this-device=Abrir BankID neste dispositivo launch.view.button.cancel=Cancelar launch.validation.error.autostarttoken.required=Entrada ausente. Tente novamente a solicitação launch.view.poll.continue=Se você não for redirecionado automaticamente, clique aqui para continuar autenticando diff --git a/src/identity-server/messages/core/sv/authenticator/bankid/launch.properties b/src/identity-server/messages/core/sv/authenticator/bankid/launch.properties index 9183f786..2ef722b6 100644 --- a/src/identity-server/messages/core/sv/authenticator/bankid/launch.properties +++ b/src/identity-server/messages/core/sv/authenticator/bankid/launch.properties @@ -39,6 +39,10 @@ launch.view.qr.screen-reader.step4.2=Använda kortkommandon launch.view.qr.screen-reader.step4.2.1=Windows: Ctrl+Pil upp launch.view.qr.screen-reader.step4.2.2=Mac: Ctrl+Cmd+F launch.view.qr.screen-reader.outro=Hålla telefonen i stående läge på ett 40cm avstånd från skärmen när du skannar QR-koden. +launch.view.button.show-qr-code=Visa QR-kod +launch.view.button.open-on-this-device=Öppna BankID på den här enheten +launch.view.show-qr-code=Visa QR-kod +launch.view.open-on-this-device=Öppna BankID på den här enheten launch.view.button.cancel=Avbryt launch.view.button.continue=Fortsätt launch.validation.error.autostarttoken.required=Saknar input. Försök igen diff --git a/src/identity-server/templates/core/authenticator/bankid/launch/index.vm b/src/identity-server/templates/core/authenticator/bankid/launch/index.vm index 71c8ef0a..8369fa62 100644 --- a/src/identity-server/templates/core/authenticator/bankid/launch/index.vm +++ b/src/identity-server/templates/core/authenticator/bankid/launch/index.vm @@ -92,30 +92,32 @@

#message("${_templatePrefix}.view.qr.screen-reader.outro")

+ #end + #if($_autostartTokenDataUri && $_autostartToken) + #end + #if($_autostartToken) - - #else -
-

#message("${_templatePrefix}.view.title")

- #parse("fragments/spinner") -
- - - #end diff --git a/src/identity-server/templates/core/fragments/bankid/bankid-app-launcher.vm b/src/identity-server/templates/core/fragments/bankid/bankid-app-launcher.vm index 66858353..28d0afa9 100644 --- a/src/identity-server/templates/core/fragments/bankid/bankid-app-launcher.vm +++ b/src/identity-server/templates/core/fragments/bankid/bankid-app-launcher.vm @@ -85,6 +85,7 @@ logger.debug("Not launching the app since the user previously cancelled in the app"); #else if (!browserStrategy.neverAutoLaunch) { + logger.debug("Launching the app"); browserStrategy.launchApp(); } else { logger.debug("Not launching the app per browser strategy configuration"); From 2efab13e6e80f76d3cf2b7eee1d480b8424e2632 Mon Sep 17 00:00:00 2001 From: Pedro Felix Date: Tue, 21 Apr 2026 10:58:35 +0200 Subject: [PATCH 3/5] IS-9422: removes extra debug message --- .../templates/core/fragments/bankid/bankid-app-launcher.vm | 1 - 1 file changed, 1 deletion(-) diff --git a/src/identity-server/templates/core/fragments/bankid/bankid-app-launcher.vm b/src/identity-server/templates/core/fragments/bankid/bankid-app-launcher.vm index 28d0afa9..66858353 100644 --- a/src/identity-server/templates/core/fragments/bankid/bankid-app-launcher.vm +++ b/src/identity-server/templates/core/fragments/bankid/bankid-app-launcher.vm @@ -85,7 +85,6 @@ logger.debug("Not launching the app since the user previously cancelled in the app"); #else if (!browserStrategy.neverAutoLaunch) { - logger.debug("Launching the app"); browserStrategy.launchApp(); } else { logger.debug("Not launching the app per browser strategy configuration"); From c6176de0f273cfd5a4bbfa636d18dafd99851df6 Mon Sep 17 00:00:00 2001 From: Pedro Felix Date: Tue, 21 Apr 2026 13:56:02 +0200 Subject: [PATCH 4/5] IS-9422: fixes incorrect URL on extend button --- .../templates/core/authenticator/bankid/launch/index.vm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/identity-server/templates/core/authenticator/bankid/launch/index.vm b/src/identity-server/templates/core/authenticator/bankid/launch/index.vm index 8369fa62..b136a43f 100644 --- a/src/identity-server/templates/core/authenticator/bankid/launch/index.vm +++ b/src/identity-server/templates/core/authenticator/bankid/launch/index.vm @@ -35,6 +35,11 @@ #else #set($qr_time_left = $_maxWaitTime / 60) #end +#if($_flowMode == 'cross-device' || $_flowMode == 'same-device') + #set($extendUrl="${_authUrl}?flowMode=$_flowMode") +#else + #set($extendUrl=$_authUrl) +#end #set($qr_time_elapsed = 0)

#message("${_templatePrefix}.page.title")

@@ -52,7 +57,7 @@ = 60) class="hide"#end>#message("${_templatePrefix}.view.qr.seconds-left")

From a91d7fe5076f249f040f47ccb6d1bde141565536 Mon Sep 17 00:00:00 2001 From: Pedro Felix Date: Tue, 21 Apr 2026 15:49:05 +0200 Subject: [PATCH 5/5] IS-9422: removes unused message keys --- .../messages/core/en/authenticator/bankid/launch.properties | 2 -- .../messages/core/pt-pt/authenticator/bankid/launch.properties | 2 -- .../messages/core/pt/authenticator/bankid/launch.properties | 2 -- .../messages/core/sv/authenticator/bankid/launch.properties | 2 -- 4 files changed, 8 deletions(-) diff --git a/src/identity-server/messages/core/en/authenticator/bankid/launch.properties b/src/identity-server/messages/core/en/authenticator/bankid/launch.properties index 06f9f211..df501507 100644 --- a/src/identity-server/messages/core/en/authenticator/bankid/launch.properties +++ b/src/identity-server/messages/core/en/authenticator/bankid/launch.properties @@ -41,8 +41,6 @@ launch.view.button.this-device=Start your BankID app on this device launch.view.button.manualstart=Start your BankID app launch.view.button.show-qr-code=Show QR code launch.view.button.open-on-this-device=Open BankID on this device -launch.view.show-qr-code=Show QR code -launch.view.open-on-this-device=Open BankID on this device launch.view.button.cancel=Cancel launch.view.button.continue=Continue launch.validation.error.autostarttoken.required=Missing input. Retry the request diff --git a/src/identity-server/messages/core/pt-pt/authenticator/bankid/launch.properties b/src/identity-server/messages/core/pt-pt/authenticator/bankid/launch.properties index 61a1b3ef..df7a02d9 100644 --- a/src/identity-server/messages/core/pt-pt/authenticator/bankid/launch.properties +++ b/src/identity-server/messages/core/pt-pt/authenticator/bankid/launch.properties @@ -41,8 +41,6 @@ launch.view.button.this-device=Iniciar o aplicativo de segurança BankID neste d launch.view.button.manualstart=Iniciar o aplicativo de segurança BankID launch.view.button.show-qr-code=Mostrar código QR launch.view.button.open-on-this-device=Abrir BankID neste dispositivo -launch.view.show-qr-code=Mostrar código QR -launch.view.open-on-this-device=Abrir BankID neste dispositivo launch.view.button.cancel=Cancelar launch.validation.error.autostarttoken.required=Entrada ausente. Tente novamente a solicitação launch.view.poll.continue=Se você não for redirecionado automaticamente, clique aqui para continuar autenticando diff --git a/src/identity-server/messages/core/pt/authenticator/bankid/launch.properties b/src/identity-server/messages/core/pt/authenticator/bankid/launch.properties index f7a88f39..762f81aa 100644 --- a/src/identity-server/messages/core/pt/authenticator/bankid/launch.properties +++ b/src/identity-server/messages/core/pt/authenticator/bankid/launch.properties @@ -41,8 +41,6 @@ launch.view.button.this-device=Iniciar o aplicativo de segurança BankID neste d launch.view.button.manualstart=Iniciar o aplicativo de segurança BankID launch.view.button.show-qr-code=Mostrar código QR launch.view.button.open-on-this-device=Abrir BankID neste dispositivo -launch.view.show-qr-code=Mostrar código QR -launch.view.open-on-this-device=Abrir BankID neste dispositivo launch.view.button.cancel=Cancelar launch.validation.error.autostarttoken.required=Entrada ausente. Tente novamente a solicitação launch.view.poll.continue=Se você não for redirecionado automaticamente, clique aqui para continuar autenticando diff --git a/src/identity-server/messages/core/sv/authenticator/bankid/launch.properties b/src/identity-server/messages/core/sv/authenticator/bankid/launch.properties index 2ef722b6..de829f5b 100644 --- a/src/identity-server/messages/core/sv/authenticator/bankid/launch.properties +++ b/src/identity-server/messages/core/sv/authenticator/bankid/launch.properties @@ -41,8 +41,6 @@ launch.view.qr.screen-reader.step4.2.2=Mac: Ctrl+Cmd+F launch.view.qr.screen-reader.outro=Hålla telefonen i stående läge på ett 40cm avstånd från skärmen när du skannar QR-koden. launch.view.button.show-qr-code=Visa QR-kod launch.view.button.open-on-this-device=Öppna BankID på den här enheten -launch.view.show-qr-code=Visa QR-kod -launch.view.open-on-this-device=Öppna BankID på den här enheten launch.view.button.cancel=Avbryt launch.view.button.continue=Fortsätt launch.validation.error.autostarttoken.required=Saknar input. Försök igen