Okay, so I suspect this is me, or else this whole entire board would be filled with frustration over GPT’s OAuth not working.
I’m in GPT, My GPT, Create GPT, simple instructions and schema - and lord I have to sell some children to get this puppy to generate an OAuth login link so the user can authenticate.
Results:
- 20 % success.
- 20 % missing client id in oauth login url
- 20 % refuses to generate an oauth url
- 20 % want re oauth w/every question.
What I’ve tried so far:
- Hundreds of variations of instructions/schema
- Tried 2 different oauth providers, tried oauth proxy, custom domains / satellite domains.
- Short list:
- Tried to describe everything “just right”, combos of descriptions.
- Little to no instructions / schema
- Confirmed oauth sessions created in provider dashboard.
- Confirmed oauth id, secret, auth and token correct, numerous providers
- Created an endpoint that only returned “authorization required”. Changed it from a 404 to a 200 and passed session ids.
- I’ve observed that in the testing mode, ChatGPT will actually make a pretend call and make a pretend response from my API saying that it needs authorization. Maybe this is the way it’s supposed to work; it just seems a little weird. It appears like it’s trying to trick itself into generating that OAuth link. Maybe it’s unrelated.
Current instructions:
behavior_rules: |
FIRST USER MESSAGE:
- Immediately provide oauth login and:
Please sign in to continue
- Do not add any extra commentary before or after the link.
- Wait for the user to complete sign-in.
AFTER A SUCCESSFUL login:
- Output exactly:
✅ You are now logged in.
- Use /webhook/info for all listing requests.
IMPORTANT:
- Do not generate OAuth links yourself.
- Do not answer questions or proceed until login is complete and the confirmation has been shown.
Current Schema:
openapi: 3.1.1
info:
title: @@@@@@@@@@@@@@@@@@@PI (minimal)
description: Public endpoint for listing information (no auth required for now)
version: 1.0.0
servers:
- url: https://conn@@@@@@@@@@@@@@@@@@@Ppp
paths:
/webhook/info:
post:
summary: Public endpoint for listing information (no auth required for now)
operationId: getListingInfo
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ListingRequest'
examples:
example1:
value:
listingId: "all"
filters:
location: "Barrington"
priceMin: 0
priceMax: 100000000
responses:
'200':
description: Successful listing retrieval
content:
application/json:
schema:
$ref: '#/components/schemas/ListingResponse'
components:
securitySchemes:
clerkOAuth:
type: oauth2
flows:
authorizationCode:
authorizationUrl: "https://log@@@@@@@@@@@@@@@@@@@P/oidc/auth"
tokenUrl: "https://logto@@@@@@@@@@@@@@@@@@@Ppp/oidc/token"
scopes: {} # empty is fine
schemas:
Listing:
type: object
properties:
id:
type: string
address:
type: string
price:
type: number
bedrooms:
type: integer
bathrooms:
type: number
squareFeet:
type: number
ListingResponse:
type: object
properties:
listings:
type: array
items:
$ref: '#/components/schemas/Listing'
ListingRequest:
type: object
additionalProperties: false
properties:
listingId:
type: string
filters:
type: object
additionalProperties: false
properties:
location:
type: string
priceMin:
type: number
priceMax:
type: number
required:
- listingId
I swear it works… sometimes. Oauth info entered in GPT Correctly
…. [had to remove screenshots b/c I’m a new poster. maybe I can add to a comment]
….edits for clarity.