@newskit-render/core 4.66.4 → 4.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [4.67.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.66.4...@newskit-render/core@4.67.0) (2026-07-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * **SVRS-6204:** limit MFA to certain pages ([#2062](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/2062)) ([16de08d](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/16de08d3bdbe6cefaf43e4a8d617e4a1fddaff8b))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [4.66.4](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@4.66.3...@newskit-render/core@4.66.4) (2026-06-30)
7
18
 
8
19
 
@@ -38,7 +38,8 @@ Cypress.Commands.add('GetAcsSession', (user = 'default') => {
38
38
  method: 'POST',
39
39
  url: 'https://login.staging-thesun.co.uk/services/session',
40
40
  headers: {
41
- 'Content-Type': 'application/vnd.newsuk.acs.createsession-v1+json',
41
+ 'Content-Type': 'application/vnd.newsuk.acs.createsession-v1+json','x-nuk-waf-bypass':
42
+ '3739ebe98d7fc43bb0de9b70db0a424c5484599bb1325dfc2c1b3c88c5150db6',
42
43
  },
43
44
  body: {
44
45
  rememberMe: false,
@@ -62,7 +63,8 @@ Cypress.Commands.add('GetTnlAcsSession', (user = 'tnl') => {
62
63
  method: 'POST',
63
64
  url: 'https://login.staging-thetimes.com/services/session',
64
65
  headers: {
65
- 'Content-Type': 'application/vnd.newsuk.acs.createsession-v1+json',
66
+ 'Content-Type': 'application/vnd.newsuk.acs.createsession-v1+json','x-nuk-waf-bypass':
67
+ '3739ebe98d7fc43bb0de9b70db0a424c5484599bb1325dfc2c1b3c88c5150db6',
66
68
  },
67
69
  body: {
68
70
  rememberMe: false,
@@ -4,17 +4,40 @@ import {
4
4
  } from '@newskit-render/my-account'
5
5
  import { publisher } from '../config'
6
6
 
7
+ /**
8
+ * Playground allow-list of page providers that require step-up MFA.
9
+ * Mirrors the consumer-owned config (e.g. sun-myaccount `config/mfaPages`).
10
+ * Any provider not listed defaults to NO MFA. ANDed with the global
11
+ * ENABLE_STEPUP_MFA env flag which acts as a master kill-switch.
12
+ */
13
+ const MFA_ENABLED_PROVIDERS = new Set([
14
+ 'PersonalDetails',
15
+ 'SubscriptionAndBilling',
16
+ 'Payment',
17
+ 'PaymentMethods',
18
+ ])
19
+
20
+ const isMfaEnabledForProvider = (provider?: string): boolean =>
21
+ process.env.ENABLE_STEPUP_MFA === 'true' &&
22
+ !!provider &&
23
+ MFA_ENABLED_PROVIDERS.has(provider)
24
+
7
25
  export const getProviderPropsUtil = (context, options?) => {
8
26
  if (process.env.NODE_ENV === 'development' && publisher === 'TIMES') {
9
27
  return getProviderPropsTimes({
10
28
  context,
29
+ enableStepUpMfa: isMfaEnabledForProvider(context?.provider),
11
30
  options: {
12
31
  ...options,
13
32
  },
14
33
  })
15
34
  }
16
35
 
17
- return getProviderProps(context, {
18
- ...options,
19
- })
36
+ return getProviderProps(
37
+ context,
38
+ {
39
+ ...options,
40
+ },
41
+ { enableStepUpMfa: isMfaEnabledForProvider(context?.provider) }
42
+ )
20
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/core",
3
- "version": "4.66.4",
3
+ "version": "4.67.0",
4
4
  "description": "Newskit Render - Core package",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -123,5 +123,5 @@
123
123
  "@types/pino-std-serializers": "2.4.1",
124
124
  "@types/pino-pretty": "4.7.5"
125
125
  },
126
- "gitHead": "83967e254ca425da9288ab5d2730b2b8a395912f"
126
+ "gitHead": "a4bba8eb0896c0060fa17207d7ee20f0f9da7ed7"
127
127
  }