Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGL Authentication #56

Open
MaximilianCroissant opened this issue May 17, 2023 · 2 comments
Open

WebGL Authentication #56

MaximilianCroissant opened this issue May 17, 2023 · 2 comments

Comments

@MaximilianCroissant
Copy link

Basically I have the same issue as this: #45
and this: #47

These are markes as resolved but I didn't find any solution (and looks like the authors didn't either?)
This is the error message:
{
"error": {
"message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": null
}
}

It happens ONLY in WebGL builds, not in the editor. No problem with the API key, as I pass it directly into the constructor. Tested in 2020.3.0f1, 2021.3.22f1, and 2022.2.19f1 so not a Unity version error.

There's something going on and I need a workaround to get a testable WEBGL build.

@LemonTreeGitHub
Copy link

LemonTreeGitHub commented Jun 16, 2023

I may just have found a dirty work around.
So essentially, what you would want to do is to remove this project as a package. and instead add the project straight into your project copy paste style.
From then, you can freely edit the Configuration.cs code and paste your secret key there, along with the org.

Doing so will make them being able to work on Webgl

This is not the best, but this is what can come up quick

@MaximilianCroissant

@srcnalt
Copy link
Owner

srcnalt commented Jul 4, 2023

Hi @MaximilianCroissant,

Could you test with the latest release? NewtonSoft.Json and code stripping related issues must be gone with the latest changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants