acheong08 / OpenAIAuth

Reverse engineered Auth0 for OpenAI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KeyError: 'accessToken'

HaodiFan opened this issue · comments

For step 8 the response is empty. Is there something updated?
image

def __part_eight(self, old_state: str, new_state) -> None:
self.debugger.log("Beginning part eight")
url = f"https://auth0.openai.com/authorize/resume?state={new_state}"
headers = {
"Host": "auth0.openai.com",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Connection": "keep-alive",
"User-Agent": self.user_agent,
"Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8",
"Referer": f"https://auth0.openai.com/u/login/password?state={old_state}",
}
response = self.session.get(
url,
headers=headers,
allow_redirects=True,
)
if response.status_code == 200:
self.session_token = response.cookies.get_dict()[
"__Secure-next-auth.session-token"
]

Print statement got removed

In line 348

self.access_token = response.json()["accessToken"]

It throws the KeyError: 'accessToken'. When I tried to print the response.json(), I just got a empty dict {}. What's wrong?

Did you call get_access_token()? It's not part of the "begin"

Did you call get_access_token()? It's not part of the "begin"

I'm using the latest v1.1ProxyAPI. I follow the document to create config.json and just run the command

python3 -m revChatGPT.Proxied

Then I met this problem

Might be invalid email/password. Not quite sure the exact reason. Can you send more debug?

Try to get it to print the response

Might be invalid email/password. Not quite sure the exact reason. Can you send more debug?

I can ensure that the email and password are valid. Will it be the reason that my ip address is in Mainland China where chatgpt service is not available?

When I saw the latest release "proxy API", I assumed that this service is provide by a third party proxy server instead of the openai offical server directly. So I assumed that this would work fine for mainland china users. So, is my assumption right?

I can ensure that the email and password are valid. Will it be the reason that my ip address is in Mainland China where chatgpt service is not available?

Yes. China is blocked by openai

When I saw the latest release "proxy API", I assumed that this service is provide by a third party proxy server instead of the openai offical server directly. So I assumed that this would work fine for mainland china users. So, is my assumption right?

Login is handled on the client side so I can't see your email/password. That is not proxied

When I saw the latest release "proxy API", I assumed that this service is provide by a third party proxy server instead of the openai offical server directly. So I assumed that this would work fine for mainland china users. So, is my assumption right?

Login is handled on the client side so I can't see your email/password. That is not proxied

I see. Thank you very much for your nice work and reply!