asgardeo-samples / asgardeo-enterprise-ciam-sample

An enterprise use case sample that captures the overall CIAM story that utilize Asgardeo and Choreo.
Apache License 2.0
0 stars 2 forks source link

Customer plan gets auto updated in the Self Care portal #22

Open ashendes opened 1 year ago

ashendes commented 1 year ago

Description: In the Customer Self Care Portal, the user's mobile plan should only get updated if they decide to switch to a different plan manually. But currently, the mobile plan gets auto updated depending on the Usage data.

Steps to reproduce:

  1. Create user and login to self care portal.
  2. Observe user's mobile plan on the Home page
  3. (Manually add usage data by invoking the Usage data API)
  4. Observe user's mobile plan on the Home page
chaminjay commented 1 year ago

This issue occurs as a result of following reasons.

  1. Upon registration with Kfone, users are not automatically granted a subscription to a plan, hence no usage data is provided as well.

  2. Therefore, /getUsageData API call gives an error.

    image
  3. To resolve this issue, in the UI level there is a fallback data object to populate usage data and subscription details. MyPlan.jsx#L92

  4. That's the reason Kfone Lite is displayed initially.

  5. This gets changed once /createUsageData API is called as it allocates a subscription plan and usage data for the user.

  6. Therefore, the subscription plan will be displayed in the UI accordingly after that.