I’m in the process of integrating a third-party service with a custom GPT and encountering a challenge regarding OAuth token management.
Initial OAuth Process: Everything works fine initially with OAuth, where after the first authentication, the access token operates as expected.
Issue with Token Renewal: The problem arises when the access token expires, which is normal. At this point, the system asks the user to authenticate again, which is standard. However, the issue is that after re-authentication, instead of renewing the access as it should, the system incorrectly redirects to https://chat.openai.com/undefined. This redirection suggests a problem in the automated management of the refresh token.
Have any of you encountered similar redirection issues after re-authenticating in your GPT-OAuth integrations?
Any advice on correctly managing the OAuth token refresh to prevent such redirection mishaps?
Are there any known fixes to ensure uninterrupted re-authentication and access token renewal?
I can confirm that token refreshes work, and that ChatGPT will call /oauth/token with your refresh token to ask for a new access token once the initial access token has expired. From reading your post, it sounds like ChatGPT was asking the user to log in again, which it shouldn’t be doing—the token refresh process should happen automatically without user interaction. Is that what’s happening?
Is there a good tutorial on how to set up a third-party service with OAuth and a custom GPT? I haven’t found one with step-by-step instructions and I keep getting stuck.
Thanks for the video, but that doesn’t quite match what I’m looking for. What I want is to create another end point that proxies the login to Google, so I can save state about the user in a DB.