org.betterportal.auth.workos
betterportal/service-betterportal-auth-workosBetterPortal WorkOS auth service
BetterPortal WorkOS Auth Service
WorkOS AuthKit provider for BetterPortal. The service redirects users to WorkOS, exchanges the callback code server-side with the WorkOS Node SDK, issues BetterPortal tokens, and refreshes BP tokens from the WorkOS refresh token.
Per-app service config requires:
clientIdapiKey
Optional config:
providerdefaults toauthkitconnectionId,organizationId,domainHintscopesroleClaimPathdefaults toroles- service config
workosStatePathdefaults to./workos-state.json; set it to a persistent path such as/data/workos-state.jsonin production - service config
syncIntervalSecondsdefaults to21600and retries stale permission/role sync every 6 hours
Registry org: betterportal.
After-login and after-logout destinations are app-owned app.auth.redirects view references configured in Tenants & Apps, not provider addon fields.
Role sync keeps BP as the permission source of truth. WorkOS permission slugs are short service-owned keys, bp_<shortId>_<read|create|update|delete>, with the full tenant/service/view mapping stored in workosStatePath. Roles are mirrored per app from WorkOS role slugs into BP app roles.
The manifest advertises role-sync endpoints through the standard auth.roles.sync.view, auth.permissions.sync, and auth.roles.sync operation roles. Consumers discover their published paths instead of depending on WorkOS route names.
Installation
bsb client install betterportal/service-betterportal-auth-workos
bsb plugin install betterportal/service-betterportal-auth-workos
npm install @betterportal/auth-workos
Configuration
Configuration options for this plugin:
No configuration required
Available Versions
Dependencies
No dependencies