Closed severinbeauvais closed 2 years ago
I set this to Priority 1 since this changes the user's account (which is not a good thing).
@amit4610 @Milan-Freshworks please triage this
Payment applied will not be applied to another account as this is managed by the payment API.
This occurs because name request, entity dashboard, director search is using bcregistry.ca whereas create business and edit business are not. Because apps are in their own domains when a user logs in an selects account we save the account, yet when they switch we lose the saved value. Common components defaults to what is currently first in the list.
As noted by Loren payment is on the correct account.
To revisit once Openshift upgrade has taken place.
Let's wait a week for OCP stuff to be done, then test to see if this has been resolved.
@severinbeauvais this appears to be resolved, presumably through the OCP migration.
Tested following your steps above (in TEST) using BCREG0009. In reproduction step 3 I chose New BC Online Tech Team from the account dropdown (2nd in the list). When I started the numbered company filing the appropriate account shows. Are you comfortable with me closing this?
Let me verify this. I will close if OK!
This problem reproduced easily just now when I followed the steps in the description (in Dev).
To summarize:
@severinbeauvais this appears to be resolved, presumably through the OCP migration.
Tested following your steps above (in TEST) using BCREG0009. In reproduction step 3 I chose New BC Online Tech Team from the account dropdown (2nd in the list). When I started the numbered company filing the appropriate account shows. Are you comfortable with me closing this?
You only went to step 6.
I tried it just now in Test using BCREG0009 and the problem reproduced (step 8).
@severinbeauvais thank you for re-testing. We will leave this one open to tackle when time allows.
@severinbeauvais is this still an issue?
@mstanton1 is this still an issue?
@severinbeauvais I have re-tested and this is still an issue.
@Sienna-Blumstengel perhaps we can work to prioritize some of the dependency work in BA guild this week.
This issue isn't super urgent, because the client can still pay with their correct account and payment method - the UI just displays the wrong account.
Recent test of this with screenshots in 10814 (which has been closed as it is a duplicate). Note: this is becoming more urgent now because when the products and services don't reload a user will have a difficult time navigating to the appropriate service.
Comment from @shabeeb-aot "Looks like this issue is happening due to different domains. home page bcregistry.ca and other one is bcregistry.daxiom.ca"
The BCROS UI calls await KeycloakService.initializeToken(null)
to sync the session. Before this call, there is no KC token in session storage. After this call, it is populated in session storage. So I am not sure if "different domain" is really an issue...?
Current account in stores in session. When user is changing account from https://test.bcregistry.ca/business/auth/home/decide-business domain it updated in current session storage.
when user move to home page, since domain changed it will call sync session , since there is no account in session storage, will set first account as current account in session storage. Need to do more research , just initial thoughts. May be we need to keep account id in URL or use iframe to set session storage across domains(not sure about security reasons).
OK, I see.
So this code will time out waiting for Current Account because it is not set in the current domain: https://github.com/bcgov/bcregistry/blob/157fdce8912e7e65ba6ae59f0dc879f62ab0cb62/pages/dashboard.vue#L91
What are the possible solutions?
Easiest option will be using same domain for both :) Another solution is have to pass current account id in URL, while loading fetch and store in session. There are other options like setting inside iframe and sync with current domain (Never tried , just read about it). Also there may be some libraries
Faiz, assuming we won't get all apps in the same domain soon, what needs to be changed to pass the account id in the URL? Which URL? Could SbcSignin component provide account data (or another event) when ready? https://github.com/bcgov/bcregistry/blob/157fdce8912e7e65ba6ae59f0dc879f62ab0cb62/pages/signin.vue#L2
cc: @thorwolpert
I think the easy way to fix this issue that we can remove the switch account options in the header menu. If the user want to using other account they can use breadcrumb go back to BCROS dashboard and switch it from there. If the user use bookmark or url access the app directly, we can redirect it back to BCROS dashboard if the session account doesn't have the product subscribed.
@pwei1018 I think that doesn't work correctly... Try this:
Please let all teams know if this fix has any impact in their apps.
This is still an issue in test env as I can reproduce it following the steps very easily. Sending it back to dev @shabeeb-aot
Verification of this ticket requires #10880 to be completed as well.
The scenario that is mentioned in description is not working. Another scenario which is not working is breadcrumbs. When navigating from breadcrumbs the account is getting switched which needs to be fixed as well.
Currently for testing I am verifying that account ID is showing in URL and when navigating to different UIs within relationships it stays the same.
For properly testing this ticket all the dependency tickets in 10880 needs to be merged together.
@rarya-freshworks - All the items related to this ticket have been developed. Can you proceed with the testing now and see if you still see that as an issue?
I am using BCeID to test the scenario mentioned in the steps and it is having issue still. It works fine with BCSC login.
Note: Here is the recording with BCeID: https://images.zenhubusercontent.com/157936592/483df3fe-0838-422b-b7e8-046d1d7c1a99/recording.mov
I am using BCeID to test the scenario mentioned in the steps and it is having issue still. It works fine with BCSC login.
Note: Here is the recording with BCeID: https://images.zenhubusercontent.com/157936592/483df3fe-0838-422b-b7e8-046d1d7c1a99/recording.mov
Can you try the same with PPR and Namex?
@shabeeb-aot any thoughts?
@shabeeb-aot What about auth-web code to add "accountid" to URL when redirecting to create a new numbered company?
Remove this ticket from SRE Jan28 Release, SRE didn't build this in PROD on January 28th
@jinghualicgi your comment above mentions this wasn't built in PROD Jan 28th. Can you confirm if it's been released?
@PatrickAHeath has had a report from a client of this issue occurring again. We've located one bug (10996) but otherwise it looks like this shouldn't be an issue?
Also, 10880 mentioned above is still in New Issues.
NOTE: This will be needed when we start to see multiple accounts in PROD.
Describe the bug in current situation It was found that navigating from Auth Web -> Filings UI -> Create UI, the account name changed.
See steps to reproduce below.
Link bug to the User Story
Impact of this bug It may be possible for a user to create/file/pay an IA using the wrong account.
Chance of Occurring (high/medium/low/very low) Is reproducible.
Pre Conditions: which Env, any pre-requesites or assumptions to execute steps? Found in Dev.
Steps to Reproduce Steps to reproduce the behavior:
Actual/ observed behavior/ results The account has changed.
Expected behavior The account remains the same as I previously selected