Open GyllionElderen opened 5 months ago
I was able to reproduce with the same experience using 3.1.3. Would you be willing to help us fix this issue by submitting a PR? Thanks!
@sebastienlevert is this possibly resolved in #2934 by https://github.com/microsoftgraph/microsoft-graph-toolkit/pull/2934/files#r1447609895 ?
This PR would only fix the loginInitiated
. This line is not touched but I don't understand why it's not reached though... https://github.com/microsoftgraph/microsoft-graph-toolkit/blob/fffb12b9cf06041b37bc857854942ec44a2a01f7/packages/mgt-components/src/components/mgt-login/mgt-login.ts#L300
OP is interested in logoutCompleted
not loginCompleted
My mistake, Copy/Past failures.
The same happens here. It should get triggered (we don't have the same weird logic we had with loginInitiated
.
I wonder if it's the second attempt to clear the cached data after provider.logout and there not being an active account?
I wonder if it's the second attempt to clear the cached data after provider.logout and there not being an active account?
This should only when there are multiple accounts logged in... But maybe?
There's no check there about the number of accounts, just the configuration of the provider.
Describe the bug The event 'logoutCompleted' for the component mgt-login is not firing.
To Reproduce Steps to reproduce the behavior:
<script src="@("https://unpkg.com/@microsoft/mgt@3/dist/bundle/mgt-loader.js")"></script>
(also make sure to that JQuery has been included for the following steps).$(document).ready(function () { document.querySelector('mgt-login').addEventListener('logoutCompleted', function () { console.log('Logout Completed!') }); });