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

Logout the Agent from everywhere #843

Open
SaqibOctave opened this issue Feb 19, 2024 · 7 comments
Open

Logout the Agent from everywhere #843

SaqibOctave opened this issue Feb 19, 2024 · 7 comments

Comments

@SaqibOctave
Copy link

Hi,
I have embeded the streams in my angular project. i wrote the logout mechanism for my application using amazon connect streams. it works perfectly fine. when i hit the logout function it log me out from the CCP.
Problem:
If i opened the application in different tabs. and i logout from one tab. i was unable to identify the logout event. I was not be able to identify any event when i logout from other tab so i was not be able to route to the login page.
What i want :
I want that, Can we get any event trigger when the agent is logedout? as we get the event agent.onStateChange(). even if the agent change the state from any tab even if the agent change his state from the default CCP.

@oharez
Copy link

oharez commented Feb 21, 2024

Second this, with some additions, similar (perhaps) use case. We need to capture the events from the client on a hosted iframe, it is mandatory with our system that we do so on the client side. The server side already receives contact traces and agent status. What we really need, is a way to either restrict logging in to the CCP within the connect console, or at least (per this post) be able to fire a backend to AWS command to change the status of the user/log them out if necessary etc. I believe this may be doable as is? But it would be really nice to have a property : where (domain/page etc) the "primary" CCP is being hosted, and the ability to limit that. It would be useful for those with hosted iframes I imagine. Or better yet, just split the property in connect console that allows access to the CCP, to two options. Allow CCP in Console, and allow external CCP.

@tannera926
Copy link
Contributor

@oharez could you open a separate issue and go into more detail on exactly what you want to accomplish here - I'm not sure I fully understand what your goals are.

@tannera926
Copy link
Contributor

@SaqibOctave have you tried subscribing to the TERMINATED event? Documentation is here. If you are using custom CCP, you will need to manually fire the TERMINATE event when an agent hits the logout endpoint.

@vpogudina
Copy link
Contributor

I think the provided link leads to some other github topic, most likely tannera926 meant to send this link

@SaqibOctave
Copy link
Author

@vpogudina @tannera926
I am using this method to logout from one place what i want is when a consumer open my application in different browsers, If he/she logout from one browser it should logout from all the browsers

@vpogudina
Copy link
Contributor

Thank you for bringing that to our attention, we will look into it and see if we can update the behavior for logout between tabs. However the browser context is independent and logging out from one browser will not affect the logged state in another browser immediately. You will get the logged out state synced after hourly check for refreshed cookie

@SaqibOctave
Copy link
Author

Thanks @vpogudina Waiting for your kind response if there is any work around please let me know

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

No branches or pull requests

4 participants