@intrface/auth
v0.0.2
Published
Intrface canonical authorization schema + helpers for WorkOS FGA (source of truth).
Readme
@intrface/auth
Canonical authorization schema + helpers for Intrface apps.
This repository is the source of truth for:
- WorkOS FGA
schema.fga - Canonical resource ID builders (so apps don’t invent strings)
- Canonical relation name constants
Install
pnpm add @intrface/authUsage
import {
platformResource,
appVoyagerResource,
PLATFORM_RELATIONS,
APP_RELATIONS,
getSchemaFgaPath
} from "@intrface/auth";
const platform = platformResource(); // "platform:intrface"
const voyagerApp = appVoyagerResource("org_123"); // "app_voyager:org_123"
// Platform role
const superuserRelation = PLATFORM_RELATIONS.superuser;
// App relations
const applicant = APP_RELATIONS.applicant;
const member = APP_RELATIONS.member;
const tenantAdmin = APP_RELATIONS.admin;
// schema.fga path for tooling
const schemaPath = getSchemaFgaPath();Publishing
This package is intended to be published to the public npm registry.
- Ensure you’re logged in:
pnpm npm whoami - Publish:
pnpm publish --access public
Notes
- WorkOS Organization represents the customer/tenant entity.
- Voyager “communities” are separate from WorkOS organizations.
