Client auth flow
signIn, signOut, and store are the only required client-callable auth
functions. Frontends use them through client({ convex, api: api.auth }).The setup flow is:
@robelest/convex-authconvex devThe wizard handles everything:
convex.config.tsauth.tshttp.tsClient auth flow
signIn, signOut, and store are the only required client-callable auth
functions. Frontends use them through client({ convex, api: api.auth }).Server helpers
Optional group SSO RPC
convex/auth/group.ts.// convex/convex.config.ts
import { defineApp } from "convex/server";
import auth from "@robelest/convex-auth/convex.config";
const app = defineApp();
app.use(auth);
export default app; // convex/auth.ts
import { createAuth } from "@robelest/convex-auth/component";
import { components } from "./_generated/api";
import { GitHub } from "arctic";
import { OAuth } from "@robelest/convex-auth/providers";
const auth = createAuth(components.auth, {
providers: [
OAuth(
new GitHub(process.env.AUTH_GITHUB_ID!, process.env.AUTH_GITHUB_SECRET!),
),
],
});
export { auth };
export const { signIn, signOut, store } = auth; // convex/http.ts
import { httpRouter } from "convex/server";
import { auth } from "./auth";
const http = httpRouter();
auth.http.add(http);
export default http; auth.http.add registers OAuth callbacks and JWKS endpoints in one call.