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

Hyperlink to Cognito login UI doesn't work when app is hosted on streamlit cloud. #2

Open
sammck opened this issue Oct 26, 2022 · 0 comments

Comments

@sammck
Copy link

sammck commented Oct 26, 2022

Hi,

I've noticed that the LOGIN/LOGOUT buttons do not work when the app is hosted on streamlit cloud. This is because the app is put into an IFRAME, so the navigation only applies to the iframe, and Cognito does not allow login/logout within an IFRAME. I don't think there is any pretty way to work around this until streamlit provides an API for navigating the top-level window.

In my own fork, I dealt with this as a special case when the APP_URI is on *.streamlitapp.com by using a standard streamlit button that when clicked simply prints an st.warning() that explains the problem and gives the login/logout URI that the user can manually copy/paste into their address bar to login or logout.

If you add an open source license (MIT preferred), I'd be happy to provide a pull request if you're interested...

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

1 participant