Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual log out does not trigger TERMINATED event #907

Open
ajspetner opened this issue Aug 5, 2024 · 2 comments
Open

Manual log out does not trigger TERMINATED event #907

ajspetner opened this issue Aug 5, 2024 · 2 comments
Labels

Comments

@ajspetner
Copy link

When manually triggering logout per the documentation as such:

fetch("https://<your-instance-domain>/connect/logout", { credentials: 'include', mode: 'no-cors'})
  .then(() => {
    const eventBus = connect.core.getEventBus();
    eventBus.trigger(connect.EventType.TERMINATE);
  });

The TERMINATED event is never triggered, contrary to the documentation.

@ajspetner
Copy link
Author

@seiyako shouldn't this be labeled as a bug, since it is not working as per the documentation?

@hngan hngan added bug and removed enhancement labels Sep 25, 2024
@hngan
Copy link
Contributor

hngan commented Sep 25, 2024

Yes, this is a known bug that we'll be fixing as part of introducing a new set of logout/login helper APIs. In the meantime, you can do a hack and replace eventBus.trigger(connect.EventType.TERMINATE); with connect.core.getUpstream().sendUpstream(connect.EventType.TERMINATE). This will work as a temporary workaround, but I can't guarantee that this to be a permanent solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants