@uipath/auth
v0.1.6
Published
Authentication module for the UiPath CLI. Handles OIDC login, token management, and credential storage.
Maintainers
Keywords
Readme
@uipath/auth
Authentication module for the UiPath CLI. Handles OIDC login, token management, and credential storage.
Installation
npm install @uipath/authUsage
Interactive Login
import { interactiveLogin } from "@uipath/auth";
await interactiveLogin({ file: ".uipath" });Client Credentials (CI/CD)
import { clientCredentialsLogin } from "@uipath/auth";
const tokens = await clientCredentialsLogin({
clientId: process.env.CLIENT_ID,
clientSecret: process.env.CLIENT_SECRET,
});Check Login Status
import { getLoginStatusAsync } from "@uipath/auth";
const status = await getLoginStatusAsync({ file: ".uipath" });API
| Export | Description |
| :--- | :--- |
| interactiveLogin(options) | Browser-based authorization code flow with PKCE |
| clientCredentialsLogin(props) | Silent client credentials flow for service accounts |
| getLoginStatusAsync(options) | Check current login status, auto-refreshes expired tokens |
| refreshAccessToken() | Refresh an expired access token |
| selectTenant() | Interactive tenant selection |
| loadConfigAsync() | Resolve auth configuration from environment |
| saveEnvFileAsync() / loadEnvFileAsync() | Credential file I/O |
License
See the root repository for license information.
