@jetbrains/hub-auth
v0.0.3
Published
Authentication utilities, services, and UI components
Keywords
Readme
@jetbrains/hub-auth
Authentication utilities, services, and UI components.
Note: This package contains specific authentication utilities and components extracted from
@jetbrains/ring-ui. The UI components are built on top of Ring UI primitives.
Install
npm install @jetbrains/hub-authRequirements
This package relies on peer dependencies. Make sure the following packages are installed in your project:
- react >= 18.0.0
- react-dom >= 18.0.0
- @jetbrains/ring-ui-built >= 7.0.0
Set styles
If you use UI components, styles must be imported manually.
Ring UI styles must be imported before hub-auth styles:
import '@jetbrains/ring-ui-built/components/style.css';
import '@jetbrains/hub-auth/style.css';Usage
This package uses deep imports:
// Pattern: @jetbrains/hub-auth/{folder}/{file}
import Auth from '@jetbrains/hub-auth/auth/auth';
import AuthDialog from '@jetbrains/hub-auth/auth-dialog/auth-dialog';Available Modules
UI Components:
auth-dialog/auth-dialog– authentication dialoglogin-dialog/login-dialog– login dialog
Services:
auth-dialog-service/auth-dialog-service– imperative auth dialog APIlogin-dialog/service– imperative login dialog API
Core Modules:
auth/*– authentication flows and token managementhttp/*– HTTP helpers and Hub-related networkingstorage/*– local and session storage utilitiespermissions/*– permissions and access helpershub-source/*– Hub-specific data sources
Scripts
Build library in watch mode:
npm run devProduction build and type generation:
npm run buildType check only:
npm run type-checkRun tests once:
npm testRun tests in watch mode:
npm run test:watch