Skip to content

Stale merchant details can leak across logout/login sessions #657

Description

@StuartFerguson

Problem

MyAccountPageViewModel now prefers ApplicationCache.GetMerchantDetails() over fetching fresh merchant details from the API.

Impact

Merchant details are not cleared on logout, so a user who logs out and then logs in as a different merchant can see the previous merchant's name/details in My Account until the cache is refreshed elsewhere.

Reproduction

  1. Log in as merchant A.
  2. Open My Account so merchant details are cached.
  3. Log out.
  4. Log in as merchant B.
  5. Open My Account.

Expected

My Account should show merchant B's details.

Actual

Cached details from merchant A can be reused.

Suggested fix

Clear cached merchant details on logout, or scope the cached value to the active session/merchant and always refresh when the session changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions