I’m developing a plugin using Oauth.
After some time without using it, my users get an error “User is missing credentials”. It blocks all chats where the plugin is enabled. (They installed it using the Unverified flow)
The only solution I found is to uninstall and re-install the plugin.
Are you using 3rd party API for OAuth? Maybe refresh_token isn’t returned so when access_token is expired OpenAI service can’t obtain a new one? Or maybe it is returned but in non-standard format, for example, it is named differently or it returns a response that is structured in unusual way?
Hi,
Thank you for your answer. Yes, I’m using a 3rd party OAuth so I don’t have control on what is generated.
I tested using the same parameters OpenAI sends when I install the plugin. Unfortunately my 3rd party doesn’t return any refresh_token…
Adding a specific parameter in the client_url fixes that, but I cannot configure it ai-plugin.json. I tried adding the request param without sucess.
Do you know a way I could add this kind of parameter in the client_url field ? Or any other way I could solve this issue ?
For what its worth, I am trying to get google as oauth provider to work with my plugin, and experience the same behaviour as OP: after plugin install everything works for a few hours. In the plugin code, I am able to query https://www.googleapis.com/oauth2/v3/userinfo with the bearer token passed by ChatGPT (so this is a correct access_token retrieved by ChatGPT on google’s authorization url)
Then at some point in the ChatGPT UI: 'User is missing credentials". This without a hit on the plugin api itself.
Auth part of my ai-plugin.json
There is not much else able to configure here. The same Oauth client config on google works fine (even after much time passed) when used with e.g. the nextauth.js demo application (https://github.com/nextauthjs/next-auth-example), so I am guessing the oauth client settings I created at google should be ok.
If anybody has any ideas left to try, would highly appreciate it!
Replace YOUR_CLIENT_ID with your own Client ID, YOUR_REDIRECT_URI with your redirect URI, and scopes with your scopes. If you’re using another auth service I’m sure there’s a way to do the same thing, just replace the URL and put in the appropriate parameters.
If I understand it correctly, that’s what’s supposed to happen according to the documentation. It appears that either ChatGPT is not asking for a refresh token, or we’re not doing something right so that ChatGPT can get the refresh token.