Back to browse
GitHub Repository
0 starsTypeScript

AuthAI, an open-source relay for user-authorized AI sessions

by riccardoio·Jun 10, 2026·1 point·0 comments

AI Analysis

MidBold BetShip It

OAuth relay for AI subscriptions, but relies on unofficial device-code flows.

Strengths
  • Per-user AES-256-GCM encryption with keys embedded in JWT — never stored server-side
  • Drop-in OpenAI SDK compatibility requires minimal code changes to existing apps
  • Self-host option available alongside free hosted relay for flexibility
Weaknesses
  • Depends on unofficial OAuth flows providers can change or revoke anytime
  • Author explicitly marks experimental — not suitable for production deployments
Category
Target Audience

Indie hackers, startup founders building AI-powered apps

Similar To

Helicone · LiteLLM · Portkey

Post Description

Hello HN,

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:

https://demo.authai.io

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?

Similar Projects

Developer Tools●●Solid

Xcode Copilot Code Assistant

Xcode + Copilot native bridge—solves real friction, but limited to one IDE and existing subscription.

Ship ItNiche Gem
mobile-ar
203mo ago
Developer Tools●●Solid

Google Search Console CLI

This turns the Search Console API into a handy, pipx-installable CLI — native OAuth (no gcloud required) and a built-in gsc doctor cut out a lot of the usual setup friction. It supports sitemap management, URL inspection with raw JSON output, and flexible analytics queries with CSV/JSON/table formats, so it’s immediately useful for scripts and agents even if it isn’t reinventing the space.

Niche GemShip It
Gregoryy
103mo ago