Skip to content

refactor(login): B2B-4930 Extract currentCustomerJWT fetch into a sha…#930

Draft
bc-arezoo wants to merge 1 commit into
mainfrom
B2B-4930-current-customer-jwt-helper
Draft

refactor(login): B2B-4930 Extract currentCustomerJWT fetch into a sha…#930
bc-arezoo wants to merge 1 commit into
mainfrom
B2B-4930-current-customer-jwt-helper

Conversation

@bc-arezoo

Copy link
Copy Markdown
Contributor

…red helper

Centralise the customer JWT fetch/persist logic that was duplicated across loginInfo and (incoming in #927) the Login page. Adds a single validity chokepoint (isCustomerJwtValid) so callers don't repeat the check.

Jira: JIRA_TOKEN

What/Why?

Rollout/Rollback

Testing

…red helper

Centralise the customer JWT fetch/persist logic that was duplicated across
loginInfo and (incoming in #927) the Login page. Adds a single validity
chokepoint (isCustomerJwtValid) so callers don't repeat the check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
return '';
});

return jwt ?? '';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Change]

return jwt ?? isCustomerJwtValid ('');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's address isCustomerJwtValid in a separate PR. Keeping PRs small and focused makes us easier to understand and review.

@bc-gauravsobti bc-gauravsobti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants