Hello!
I am currently building out a project on Streamlit with the library spotipy. In order for users to fully access the site and use features I would like to build, they need to authenticate it. This gives them a redirect uri which gives access to other parts of the script to be utilized.
I can run this locally and when I click a button, the redirect uri happens, the site is happy and everything runs well. However when I push to the web and I click the button, it no longer redirects and gets stuck waiting for the code from the redirect uri.
Has anyone else experienced this or have a work around?
I am currently stuck on this step as well! I’m able to read the client credentials by passing them as secrets, but the redirect URI is hanging every time I reboot.
Let me know if you find a solution, and I’ll do the same.
Figured it out! I went down quite the rabbit hole trying to use selenium to open up an auth window in the app, hacking the Cloud containers to install browsers with os.system(), and finally a headless browser with user/pw input from the app.
In the end, it’s as simple as displaying a hyperlink for login using markdown and html, redirecting the auth page back to your app url, and using st.experimental_get_query_params() to obtain the code from the response url.
Additionally, during this process I learned that the Spotify Developer platform only allows 25 named users in its first tier; you need the email associated with every users’ account. After that, you must request a quota extension, which they explain is not for “hobby projects”.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.