Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acheong08/OpenAIAuth
Reverse engineered Auth0 for OpenAI
https://github.com/acheong08/OpenAIAuth
Last synced: 2 months ago
JSON representation
Reverse engineered Auth0 for OpenAI
- Host: GitHub
- URL: https://github.com/acheong08/OpenAIAuth
- Owner: acheong08
- License: mit
- Archived: true
- Created: 2022-12-07T08:14:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-07T14:37:52.000Z (over 1 year ago)
- Last Synced: 2024-07-18T17:44:32.036Z (6 months ago)
- Language: Go
- Homepage:
- Size: 110 KB
- Stars: 459
- Watchers: 13
- Forks: 136
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-chatgpt - OpenAI Auth
README
# OpenAIAuth
Fetch access tokens for chat.openai.com## Python version
```py
from OpenAIAuth import Auth0
auth = Auth0(email_address="[email protected]", password="example_password")
access_token = auth.get_access_token()
```## Go version
```go
package mainimport (
"fmt"
"os""github.com/acheong08/OpenAIAuth/auth"
)func main() {
auth := auth.NewAuthenticator(os.Getenv("OPENAI_EMAIL"), os.Getenv("OPENAI_PASSWORD"), os.Getenv("PROXY"))
err := auth.Begin()
if err.Error != nil {
println("Error: " + err.Details)
println("Location: " + err.Location)
println("Status code: " + fmt.Sprint(err.StatusCode))
println("Embedded error: " + err.Error.Error())
return
}
token, err := auth.GetAccessToken()
if err.Error != nil {
println("Error: " + err.Details)
println("Location: " + err.Location)
println("Status code: " + fmt.Sprint(err.StatusCode))
println("Embedded error: " + err.Error.Error())
return
}
fmt.Println(token)
}
```## Credits
- @linweiyuan
- @rawandahmad698
- @pengzhile