From ec250f6a0dceca3bb2db8110b2fba92924594348 Mon Sep 17 00:00:00 2001 From: Matthias <77016909+mgelgon@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:32:54 +0100 Subject: [PATCH] Refresh token for link/unlink SLO (#9) --- .../cartridge/controllers/Account.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cartridges/int_reachfive_sfra/cartridge/controllers/Account.js b/cartridges/int_reachfive_sfra/cartridge/controllers/Account.js index 607041c..fd7e7a2 100644 --- a/cartridges/int_reachfive_sfra/cartridge/controllers/Account.js +++ b/cartridges/int_reachfive_sfra/cartridge/controllers/Account.js @@ -109,6 +109,16 @@ server.append('Show', function (req, res, next) { passwordResetCTA = !viewData.account.isExternallyAuthenticated; } + //If Social Unlink / Link displayed + if( socialNetworksCTA ) + { + var tknStatus = reachFiveHelper.verifySessionAccessTkn(); //Check and refresh the access token if needed + if( !tknStatus.success ) + { + socialNetworksCTA = false; + } + } + res.setViewData({ reachfive: { passwordUpdateCTA: passwordUpdateCTA,