Open matdmiller opened 2 weeks ago
I went through and tested previous versions of Gradio and it appears that 4.26 was the last version that worked and every version since 4.27 that I tested did not work including 4.36.1 which is the latest as of today.
When I was trying to latest version that did work it redirects the page to https://matdmiller-hf-oauth.hf.space/ instead of only redirecting the iframe. I then tried upgrading the version of gradio to 4.36.1 and starting out at https://matdmiller-hf-oauth.hf.space/ instead of https://huggingface.co/spaces/matdmiller/hf-oauth after the page reloaded and it worked. It seems like something with the default iframe spaces implementation is broken when using huggingface oauth, but not if you visit the second version of the URL.
Thank you for the detailed issue report @matdmiller! @Wauplin do you think you could take a look into this as its likely due to https://github.com/gradio-app/gradio/pull/8000 or https://github.com/gradio-app/gradio/pull/7887?
Describe the bug
The Login With Huggingface button and corresponding Oauth flow is not working. When I click the Sign In With Hugging Face button it takes me to a page to input my Hugging Face Username and Password. When I click Log In it asks for my MFA code. When I input that and click Verify in Safari it takes me back to the login screen again and in Chrome a grey box pops up and says Too Many Redirects.
I tried to implement the Huggingface Login Button into my app by referencing the example in the docs. When I was unable to get that working I fell back to creating a new Space using the exact code from the docs and experienced the same result. I also tried the Login With Huggingface Oauth template workspace and experienced the same result. I've tried in Safari and Chrome on MacOS Sonoma including Incognito mode in Chrome.
Have you searched existing issues? 🔎
Reproduction
Tested in HF Space: https://huggingface.co/spaces/matdmiller/hf-oauth app.py -> from docs: https://www.gradio.app/guides/sharing-your-app#o-auth-login-via-hugging-face
Readme.md
Screenshot
Logs
System Info
Severity
Blocking usage of gradio