# Gradio authentication not working in Spaces

**URL:** <https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629>\
**Category:** Spaces\
**Created:** [November 6, 2022, 7:54am UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629 "2022-11-06T07:54:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenndanielso](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/kenndanielso/32/12431_2.png) [@kenndanielso](https://discuss.huggingface.co/u/kenndanielso)\
**Post date:** [November 6, 2022, 7:54am UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629/1 "2022-11-06T07:54:08Z")

</div>

I’m using the login authentication method demo.launch(auth=(X,X)). The log in page is showing up in my spaces but when i enter the right credentials it just resets to the log in page and doesn’t load the app. When I enter the incorrect credentials, it responds with incorrect credentials. Anyone else dealt with this? I’m using OpenAI API and have enable\_queue=FALSE enabled.

---

<div class="post-metadata">

**Author:** ![rjadr](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rjadr](https://discuss.huggingface.co/u/rjadr)\
**Post date:** [November 11, 2022, 7:07pm UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629/2 "2022-11-11T19:07:42Z")

</div>

Looks like this issue is still [unresolved](https://github.com/gradio-app/gradio/issues/1259).

---

<div class="post-metadata">

**Author:** ![ambITious](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@ambITious](https://discuss.huggingface.co/u/ambITious)\
**Post date:** [December 22, 2022, 6:41am UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629/3 "2022-12-22T06:41:47Z")

</div>

any resolution or work around for this?

---

<div class="post-metadata">

**Author:** ![yugan](https://avatars.discourse-cdn.com/v4/letter/y/e47c2d/32.png) [@yugan](https://discuss.huggingface.co/u/yugan)\
**Post date:** [January 24, 2023, 12:35pm UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629/4 "2023-01-24T12:35:40Z")

</div>

this still seems to be an issue sadly

---

<div class="post-metadata">

**Author:** ![freddyaboulton](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/freddyaboulton/32/32732_2.png) [@freddyaboulton](https://discuss.huggingface.co/u/freddyaboulton)\
**Post date:** [January 24, 2023, 5:51pm UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629/5 "2023-01-24T17:51:03Z")

</div>

Hi everyone!

We have an open PR to fix this here: [Fix auth on spaces by freddyaboulton · Pull Request #3049 · gradio-app/gradio · GitHub](https://github.com/gradio-app/gradio/pull/3049)

Hopefully we can get this fix out to everyone soon!

---

<div class="post-metadata">

**Author:** ![brianjking](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@brianjking](https://discuss.huggingface.co/u/brianjking)\
**Post date:** [February 13, 2023, 8:29pm UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629/6 "2023-02-13T20:29:44Z")

</div>

@freddyaboulton @kenndanielso

I’m using a duplicated copy of the SD Web UI on Docker via HF Spaces.

> **[Dockerfile.Private.Nightly.A10G · camenduru/webui-docker at main](https://huggingface.co/spaces/camenduru/webui-docker/blob/main/Dockerfile.Private.Nightly.A10G)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

It looks like the launch is here: [oh-no.py · camenduru/webui-docker at main](https://huggingface.co/spaces/camenduru/webui-docker/blob/main/oh-no.py).

Essentially what I want to do is allow the space to be public so that it can be embedded in an iframe / webcomponent while also not running up a huge bill with the public starting my space up and keeping it running 24/7.

Thanks!

---

<div class="post-metadata">

**Author:** ![AlanMars](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/alanmars/32/16218_2.png) [@AlanMars](https://discuss.huggingface.co/u/AlanMars)\
**Post date:** [May 18, 2023, 3:09am UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629/7 "2023-05-18T03:09:22Z")

</div>

Hi Kenndanielso,

It seems that this issue has been resolved.  
It can work well in Google Chrome Version 113.0.5672.92 (Official Build) (arm64) on “PC”. (Gradio 3.29.0 + Python 3.8.9 + Huggingface Space).

But we have the same failed auth issue on the Mobile Chrome Web browser (Chrome, Safari). Do you have this issue on your Phone Browser?

---

<div class="post-metadata">

**Author:** ![prismglider](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@prismglider](https://discuss.huggingface.co/u/prismglider)\
**Post date:** [April 5, 2024, 5:17pm UTC](https://discuss.huggingface.co/t/gradio-authentication-not-working-in-spaces/25629/8 "2024-04-05T17:17:10Z")

</div>

I am now experiencing this problem intermittently in Safari and Chrome. It seems to happen in chrome while using private tabs, but it has happened in Safari multiple times.

It does not occur when using firefox, so far. Can we get an update on this to see if the issue has come back?
