My name is Riccardo and I created AuthAI for indie hackers.
The idea is quite simple: let the end users connect their chatgpt/grok/copilot account and route the AI requests through their AI subscriptions.
This enable a lot of new cool ideas where the business model/unit economics don't always make sense.
The flow is straightforward:
They click on "login with AI", choose their provider, and authorise the device on the provider's website.
Tokens get encrypted using a per-user AES-256-GCM encryption key, which isn't stored anywhere server-side and only exists within the user's JWT session. The whole security model can be found on the website/github.
Here is a demo:
From a developer's perspective, the objective is to stay as close to the OpenAI SDK as possible:
```ts const openai = new OpenAI({ apiKey: jwt, baseURL: "https://relay.authai.io/v1", defaultHeaders: { "x-authai-secret": process.env.AUTH_AI_SECRET, }, }); ```
Also, there is a React SDK for handling the connection flow.
* It's MIT licensed and completely open-source, there's a hosted relay available, however, the entire stack is self-hostable.
GitHub repo:
https://github.com/authai-io/authai
Would you use something like this for your generated applications and side projects? What else could I add?