Supabase + Custom ChatGPT
Hi, I implemented a custom ChatGPT that uses Supabase to make database calls to read and write content from the user. I'd like to implement authentication through OAuth though and struggling so far. Any advice?
18 Replies
what are you struggling with?
how to auth someone before calls to chatgpt?
exactly
I added google oauth and that works fine but then openAI insists on having all domains be the same so can't make calls to a supabase URL
you're not going to call with the user info to chatgpt. you're going to call with your credentials and keep track and bill the customer later
I'm not even thinking about billing for now, I just want to be able to allow the user to register/login so that I can securely read and write to my database with info they share, does that make sense?
this is not making sense to me. Can you describe the customer interaction? It sounds like
user visits website -> user chats with chatgpt -> chatgpt takes user creds and tries to trigger supabase call
no this is a custom ChatGPT hosted chat.openai.com
They launched a store today for reference
I've built a custom ChatGPT already that makes server calls
ChatGPT
ChatGPT - Judge Dredd
I judge arguments between you and your friends (or enemies). Come to me when you're ready for a final judgement.
Check it out, it'll call custom actions
This is for fun, I'm working on an actual custom one with a business use case
But let's say I want to implement authentication on Judge Dredd, I'd need to implement OAuth
So customer is on chat.openai, loads up my chatgpt, chatpgpt asks them to register or login and triggers an Oauth call, they navigate to a page where they login/register, they get sent back via redirect/callback to chat.openai w access token and now they're authenticated

Yeah unfortunately I think they're all paywalled under Plus for now
I suspect that will change soon if they want to scale
Which I imagine they will
Does the use case make sense though?
so you want chatgpt to pay you as well as a user to sign up through somewhere else?
The user signup is not motivated by selling but by allowing me to store data from their engagement
i would think that chatgpt would be the one collecting that info and then allowing you to see it
Imagine it's a journal app, and the user asks about what they wrote a week ago, I'd like to be able to pull that info and process it
openai rather
They don't
I don't think it would make sense for the use case anyways, I'm not just storing what the user writes but also extracting some meta data
it'd be a mess if all of that appears in the chat
i'm not sure how you would implement that in the chatgpt store. If you're just using the api to build custom chat-gpt instances it would work more how you're describing. You could setup an auth flow for the user there.
because at that point you're having a front end / server sit in front of the chatgpt calls and you can collect whatever you want
i would suspect that open ai will be very concerned if builders started collecting data on the usage of the bots in their store without open ai controlling it somehow.
I'm trying to use fastapi with Auth0 now and see if that works
what do you think?
Ended up finding a solution w/o supabase auth