Pop-up appears briefly but disappears - how to diagnose?
This project looks very promising (and there are not a lot of other options I can find) for SSO / Azure AD authentication of my Streamlit App. I am self-hosting on a Win10 workstation to which I have administrative access. My internal customers (inside the firewall) can access the App fine, but I would like to implement SSO as I increase the number of users. (I'm currently using Streamlit-authenticator with flat-file user management)
I get the pop-up for about 1/2 a second, but it disappears immediately and of course is not returning a token... In the address bar, I think I see about:blank but that's it...
I've tried in both Chrome and Firefox and allowed pop-ups and redirects from https://login.microsoftonline.com in both browser settings.
Am I the only one to see this issue? Is there a way to diagnose this? help please?!
I will try to have a look. I have mainly been testing in UNIX (Mac/linux) setups. I apologize for only having so much time to look at it. Thanks for appreciating the effort!
Sincerely, Michael
tors. 25. jan. 2024 kl. 14.06 skrev OldishCoder @.***>:
This project looks very promising (and there are not a lot of other options I can find) for SSO / Azure AD authentication of my Streamlit App. I am self-hosting on a Win10 workstation to which I have administrative access. My internal customers (inside the firewall) can access the App fine, but I would like to implement SSO as I increase the number of users. (I'm currently using Streamlit-authenticator with flat-file user management)
I get the pop-up for about 1/2 a second, but it disappears immediately and of course is not returning a token... In the address bar, I think I see about:blank but that's it...
I've tried in both Chrome and Firefox and allowed pop-ups and redirects from https://login.microsoftonline.com in both browser settings.
Am I the only one to see this issue? Is there a way to diagnose this? help please?!
— Reply to this email directly, view it on GitHub https://github.com/mstaal/msal_streamlit_authentication/issues/33, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4LJ3YLKGM5CV2CMZQCXQ3YQJKGZAVCNFSM6AAAAABCKPYJBGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEYDAMZWG42DCMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Michael,
Just a follow-up... The pop-up seems to appear correctly on the web browser on the computer serving the Streamlit application. But on any machine on the local network that attempts to attach and login just sees the quick flash of the popup and it goes away.
I've managed to get to the msal_streamlit_authenticator js file [ http://{server ip}:8502/component/msal_streamlit_authentication.msal_authentication/assets/index-2ec6ec11.js].
I've discovered that the loginPopup function from the embedded MSAL js library (@azure/msal-browser 2.36.0) is where the pop-up is spawned. Currently using the Firefox debugger to trace, learning a lot, but still not finding a clear difference between the successful pop-up on the hosting machine and the flash pop-up on the network connected machine. Right now it's looking like the issue may be in the MSAL library itself? Apparently msal-browser current is at 3.7.1, so the version in this plugin is a bit old, but still investigating...
thanks, OC
OK, new post this time instead of editing previous...
I think the network machine is tripping on this error:
BrowserAuthError: pkce_not_created: The PKCE code challenge and verifier could not be generated. Detail:TypeError: window.crypto.subtle is undefined"
Both browsers are Firefox (though I get the same symptoms with Chrome) with the same revision level managed by our Corporate IT group... I'm trying to drill down to where this message is thrown... it's in the MSAL stuff while trying to verify the browser can handle the popupLogin...
I do not trip this error on the hosting machine.
How hard is it to update the msal-browser and msal-common components in your app? I tried a copy paste replacement in the minified index-2ec6ec11.js file itself, but was not successful... guessing the react code and msal-xxx code are intermingled? --OC
Hi there,
I get the same behaviour with a similar setup: The Streamlit app is hosted on an Ubuntu server and we try to access it from our client's Windows machine. Did you find a fix for this?
Hi, sorry, just noticed your question. No, I was not able to make this work. I spent some time debugging the JS and it seems the issue is in the MSAL JS code and not in the msal_streamlit_authenticator code itself. The version of MSAL in the project is older and may be the problem. Unfortunately I do not understand how to rebuild this project and update the MSAL library, but I suspect this may be require to make this project work going forward?
I see the exact same issue in my dev (not yet deployed) system. I'm running and accessing from the same machine, and I see the same issue.
Ran into same issue. Running python application in colima+docker locally -> this login pop-up flashing happens and prevents logging in.