Skip to content

Commit 4a8c6ef

Browse files
author
Nick Campanini
committed
gate replacement link behind feature flag, improve CardSelection empty states, add explicit signing key validation
1 parent 587614e commit 4a8c6ef

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/SEBT.Portal.Api/Controllers/Auth/OidcController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ public async Task<IActionResult> CompleteLogin(
118118
var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(signingKey));
119119
var validationParams = new TokenValidationParameters
120120
{
121+
ValidateIssuerSigningKey = true,
121122
ValidateIssuer = false,
122123
ValidateAudience = false,
123124
ValidateLifetime = true,

src/SEBT.Portal.Web/src/features/cards/components/CardSelection/CardSelection.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,15 @@ export function CardSelection() {
6060
const groups = buildApplicationGroups(data.applications)
6161

6262
if (groups.length === 0) {
63+
const hasApplications = data.applications.length > 0
6364
return (
6465
<Alert variant="info">
65-
{t('cardSelectionNoChildren', 'No children found in your household.')}
66+
{hasApplications
67+
? t(
68+
'cardSelectionAllInCooldown',
69+
'All cards were recently replaced. Please try again later.'
70+
)
71+
: t('cardSelectionNoChildren', 'No children found in your household.')}
6672
</Alert>
6773
)
6874
}

src/SEBT.Portal.Web/src/features/household/components/ChildCard/ChildCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const CARD_TYPE_KEYS: Partial<Record<IssuanceType, string>> = {
5757
// Keys map to CSV: "S2 - Portal Dashboard - Card Table - {Key}"
5858
export function ChildCard({ child, application, id, defaultExpanded = true }: ChildCardProps) {
5959
const { t, i18n } = useTranslation('dashboard')
60+
const enableCardReplacement = useFeatureFlag('enable_card_replacement')
6061
const showCaseNumber = useFeatureFlag('show_case_number')
6162
const showCardLast4 = useFeatureFlag('show_card_last4')
6263
const [isExpanded, setIsExpanded] = useState(defaultExpanded)
@@ -65,7 +66,7 @@ export function ChildCard({ child, application, id, defaultExpanded = true }: Ch
6566
const { caseNumber, benefitIssueDate, benefitExpirationDate, last4DigitsOfCard, issuanceType } =
6667
application
6768
const cardTypeKey = issuanceType ? (CARD_TYPE_KEYS[issuanceType] ?? null) : null
68-
const replacementLink = getReplacementLink(application)
69+
const replacementLink = enableCardReplacement ? getReplacementLink(application) : null
6970

7071
return (
7172
<div className="usa-accordion__item">

src/SEBT.Portal.Web/src/features/household/components/DashboardAlerts/DashboardAlerts.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { useHouseholdData } from '@/features/household'
1111
* Displays success and warning alerts on the dashboard triggered by URL search params.
1212
* Captures alert state on first read, then cleans the params from the URL.
1313
* The alert persists because rendering is driven by captured state, not live params.
14-
* Card replacement success (flash=card_replaced) sources dynamic details from the
15-
* household data cache rather than URL params to avoid PII in URLs.
14+
* Card replacement success (flash=card_replaced) checks the household data cache
15+
* for address presence to tailor the alert body, avoiding PII in URL params.
1616
*/
1717
export function DashboardAlerts() {
1818
const { t } = useTranslation('dashboard')

0 commit comments

Comments
 (0)