@cavicode/sso-webclient (0.3.2)
Published 2026-07-25 17:55:16 +03:00 by CaviCode
Installation
@cavicode:registry=npm install @cavicode/sso-webclient@0.3.2"@cavicode/sso-webclient": "0.3.2"About this package
CaviCode.SSO.WebClient
SSO BFF web client for CaviCode Network panels.
Consumes the /auth/* endpoints exposed by CaviCode.SSO.NetClient (server-side BFF).
Does NOT handle OIDC directly — the BFF does all OIDC. This client just consumes the session.
Install
npm install @cavicode/sso-webclient
Package releases are published on v* tags to the CaviCode-SSO
organization registry:
https://git.cavicode.tech/api/packages/CaviCode-SSO/npm/
Usage
import { createPanelAuthApi, type PanelAuthHttpClient } from '@cavicode/sso-webclient'
// http is your axios/fetch wrapper implementing PanelAuthHttpClient
const auth = createPanelAuthApi(http)
// Get current user
const user = await auth.getCurrentUser()
// { subject, email, displayName, roles, role }
// Build login URL
const loginUrl = auth.buildLoginUrl('/dashboard')
// Refresh session
const user = await auth.refreshSession()
// Logout
const endSessionUrl = await auth.logout(true)
API
createPanelAuthApi(http, rolePriority?)— create auth API clientgetCurrentUser()—GET /auth/mebuildLoginUrl(returnUrl?, forceLogin?)— builds/auth/login?returnUrl=...refreshSession()—POST /auth/refresh-sessionlogout(federated?)—POST /auth/logout?federated=...pickPrimaryRole(roles, priority?)— pick primary role by prioritynormalizePanelUser(payload, rolePriority?)— normalize user payload
Dependencies
Development dependencies
| ID | Version |
|---|---|
| typescript | ^5.7.0 |
Keywords
cavicode
sso
oidc
bff
auth
Details
2026-07-25 17:55:16 +03:00
Assets (1)
Versions (1)
View all
npm
3
MIT
latest
3.1 KiB
sso-webclient-0.3.2.tgz
3.1 KiB
0.3.2
2026-07-25