how it works

three steps to real accounts

01

install @hyperyai/sdk

one package gives you the provider, hooks, and prebuilt components. no session server to stand up, no jwt plumbing to hand-roll.

02

wrap your app

drop <HyperyProvider> at the root with your clientId, redirectUri, and gatewayUrl. everything below it can read the signed-in user.

03

gate with signedin / signedout

render <SignedIn> and <SignedOut> to split your ui, and drop in <SignIn> and <UserButton> for hosted, themeable auth surfaces.

drop-in provider

wrap your app once

one provider gives every component access to the signed-in user, hosted auth ui, and scoped gateway access — all from your existing layout file.

  • passkeys, magic link, password, google, github, and 2fa
  • prebuilt <SignIn> and <UserButton> components
  • <SignedIn> / <SignedOut> to gate any part of your ui
  • request gateway scopes right in the provider config
import {
HyperyProvider,
SignedIn,
SignedOut,
SignIn,
UserButton,
} from "@hyperyai/sdk"
 
export default function RootLayout({ children }) {
return (
<HyperyProvider
config={{
clientId: process.env.NEXT_PUBLIC_HYPERY_CLIENT_ID,
redirectUri: "https://yourapp.com/callback",
gatewayUrl: "https://hypery.ai",
scopes: ["read", "ai:chat"],
}}
>
<SignedIn>
<UserButton />
{children}
</SignedIn>
<SignedOut>
<SignIn />
</SignedOut>
</HyperyProvider>
)
}

faq

questions

which login methods are supported?

passkeys, magic links, password, google, and github out of the box, plus optional 2fa. users pick whatever they prefer and you write none of the flows.

do i have to build my own login ui?

no. <SignIn> and <UserButton> are prebuilt, themeable components. you can also use the hosted ui if you would rather not render auth surfaces yourself.

what config does the provider need?

clientId, redirectUri, and gatewayUrl. an optional scopes array requests the gateway permissions your app needs, from read and write up to ai:chat and billing:read.

does this also authorize gateway calls?

yes. the same identity that logs a user in can carry scoped access to the model gateway, so your backend calls run on that user’s behalf with the scopes you requested.

add login to your ai app

ship accounts today

install @hyperyai/sdk, wrap your app, and hand users passkeys and social login without standing up an auth service.

$npm install @hyperyai/sdk