# Can't use OAuth; ChatGPT just hangs

**URL:** <https://community.openai.com/t/cant-use-oauth-chatgpt-just-hangs/585566>\
**Category:** Plugins / Actions builders\
**Tags:** actions\
**Created:** [January 13, 2024, 6:04pm UTC](https://community.openai.com/t/cant-use-oauth-chatgpt-just-hangs/585566 "2024-01-13T18:04:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Orome](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/orome/32/73035_2.png) [@Orome](https://community.openai.com/u/Orome)\
**Post date:** [January 13, 2024, 6:04pm UTC](https://community.openai.com/t/cant-use-oauth-chatgpt-just-hangs/585566/1 "2024-01-13T18:04:19Z")

</div>

I’m getting weird behavior with OAuth in my Actions. I’ve got endpoints that generate valid tokens and return the required JSON, but once I’ve gone through the OAuth process, ChatGPT just loops endlessly, never actually accessing any functions, and eventually (after a few seconds) exhausting my GPT-4 quota. I get no error information.

Anyone seen anything like this? I’ve got nothing to work with to figure out what’s happening. The token generation on my backend works fine, and the generated tokens are valid, but once generated ChatGPT just spins.

I wonder of perhaps my OpenAPI is misconfigured? What should `components.securitySchemes` be, for example? I’m assuming, perhaps naively, that it remains

```auto
    BearerAuth: # arbitrary name for the security scheme
      type: http
      scheme: bearer

```

This is how my endpoints all actually work, and how the existing OpenAPI spec for them is configured. A token is acquired by the client, and then used for access. I _assume_ that’s what the GPT’s Actions are doing: OAuth is used to get a token and that is used according to the `ecuritySchemes` as http/bearer (like any other access to my endpoints).

---

<div class="post-metadata">

**Author:** ![shatzakis](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/shatzakis/32/140348_2.png) [@shatzakis](https://community.openai.com/u/shatzakis)\
**Post date:** [January 13, 2024, 6:11pm UTC](https://community.openai.com/t/cant-use-oauth-chatgpt-just-hangs/585566/2 "2024-01-13T18:11:50Z")

</div>

Additional places to look for errors:

1. any server you using to host the endpoints (beyond those hosted in a GPT action schema)
2. browser console errors (open dev tools to track what happens during the loop/errors)
3. OAuth processes (callback or misconfig errors etc… either in your custom build or using Auth0, or other 3rd party)

I would feed any such errors back into ChatGPT (maybe use the Grimoire GPT, to help debug and format your OpenAPI.yaml file as well).

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Orome](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/orome/32/73035_2.png) [@Orome](https://community.openai.com/u/Orome)\
**Post date:** [January 13, 2024, 6:15pm UTC](https://community.openai.com/t/cant-use-oauth-chatgpt-just-hangs/585566/3 "2024-01-13T18:15:49Z")

</div>

All my server logs are fine. OAuth flow works as expected, but then there’s no further access from the GPT. Where will I find logs of what GPT is doing?

If I try this in the “test” console (i.e. in the context of the GPT builder). I am logged on successfully (I’m told so), and dumped in a fresh chat, and then if I do something that should access an endpoint, it just loops without ever accessing my backend (eventually exhausting my quota).

---

<div class="post-metadata">

**Author:** ![Orome](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/orome/32/73035_2.png) [@Orome](https://community.openai.com/u/Orome)\
**Post date:** [January 13, 2024, 6:31pm UTC](https://community.openai.com/t/cant-use-oauth-chatgpt-just-hangs/585566/4 "2024-01-13T18:31:48Z")

</div>

> [@shatzakis](#):
>
> maybe use the Grimoire GPT

It says my OpenAPI spec is fine and then suggests checking all the stuff I’ve already checked; and using the forums.
