How can I implement logout functionality in Gradio?

Hello everyone,

I hope you’re all doing well. I have a question regarding the Gradio library’s functionality, specifically related to implementing a logout feature. Currently, I’m using the library’s login feature with the following code example:

demo.launch(auth=("username", "password"))

This serves as an example for the login functionality. However, I’m interested in incorporating a logout feature as well. I’m wondering how I can go about implementing this in my Gradio application. Any guidance or code examples on how to achieve this would be greatly appreciated.

Thank you in advance for your assistance!

Best regards,

Hi @Buddies, we don’t currently support this, but we are working on it. Please follow this issue: Request for Adding Logout Functionality · Issue #5163 · gradio-app/gradio · GitHub