Closed pcampospulsarsd closed 3 years ago
@pcampospulsarsd Can you clarify what you mean by calls cancelled? This is not expected behavior. Could you also provide your configurations and usage?
@jo-arroyo , thank you for the confirming that that is not the expected behaviour. With that information, we instead did the msal-angular integration part from the start and making sure it is aligned with the example of angular11-b2c-sample. At the same time revisited the azure configuration which is aligned with what is specified in the pre-requisites. With those parts reviewed, it is now working seamlessly.
This question can be marked as resolved for now, below would be the information on what we think caused the issue.
Can you clarify what you mean by calls cancelled?
- The call to logout was aborted, the har file "response" for the postLogout is as follows :
"response": { "status": 0, "statusText": "", "httpVersion": "", "headers": [], "cookies": [], "content": { "size": 0, "mimeType": "x-unknown" }, "redirectURL": "", "headersSize": -1, "bodySize": -1, "_transferSize": 0, "_error": "net::ERR_ABORTED" }
- Which we believe was due to the immediately succeeding call to authorize endpoint.
As for the cause, after investigating, it is likely caused by the code base having lots of listeners which have unchecked code inside which likely triggered the authorize endpoint to call an api.
Library
@azure/msal-angular@2.0.0-alpha.3
@azure/msal-browser@2.9.0
Framework
Description
We are following the example in angular11-b2c-sample and having issues when we logout the user calling
msalService.logout()
, as we have observed the following is happening:https://<directory>.b2clogin.com/<directory>.onmicrosoft.com/b2c_1_sign_up_sign_in/oauth2/v2.0/logout?post_logout_redirect_uri=http%3A%2F%2Flocalhost%3A4202%2F&client-request-id=<id>
- we currently do not understand why this gets cancelled, is this expected?https://<directory>.b2clogin.com/<directory>.onmicrosoft.com/b2c_1_sign_up_sign_in/oauth2/v2.0/authorize
- we currently do not understand why authorize is being called at this stage but this seems to be the one triggering the redirection back to the applicationhttps://<directory>.b2clogin.com/<directory>.onmicrosoft.com/b2c_1_sign_up_sign_in/oauth2/v2.0/token
- we currently do not understand what triggers this one and why it is successful since we have just logged out.As we observe it to be different based on angular11-b2c-sample which we have updated to the library versions above, we are curious if there is any azure configuration that we might have missed? so far we have configured it as follows:
Notes:
Source
Thank you.