kavachOS
Authentication

Roblox

Sign in with Roblox using OAuth 2.0.

Setup

Get credentials

Go to create.roblox.com and navigate to Dashboard > Credentials. Create an OAuth 2.0 app and set your redirect URI:

https://your-app.com/api/kavach/auth/oauth/callback/roblox

Configure

lib/kavach.ts
import { createKavach } from 'kavachos';
import { oauth } from 'kavachos/auth';

const kavach = await createKavach({
  database: { provider: 'sqlite', url: 'kavach.db' },
  plugins: [
    oauth({
      providers: [
        {
          id: 'roblox',
          clientId: process.env.ROBLOX_CLIENT_ID!,
          clientSecret: process.env.ROBLOX_CLIENT_SECRET!,
        },
      ],
    }),
  ],
});
ROBLOX_CLIENT_ID=...
ROBLOX_CLIENT_SECRET=...

Scopes

Default scopes: openid, profile

ScopeWhat it unlocks
openidOIDC identity token
profileDisplay name and profile URL
emailEmail address (if verified)

Roblox OAuth 2.0 is currently in open beta. User IDs are stable numeric values that persist across username changes.

Endpoints

MethodPathDescription
GET/auth/oauth/authorize/robloxRedirect to Roblox
GET/auth/oauth/callback/robloxHandle callback

On this page