@uipath/auth 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/dist/index.js +1 -1
- package/package.json +38 -38
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# @uipath/auth
|
|
2
|
+
|
|
3
|
+
Authentication module for the UiPath CLI. Handles OIDC login, token management, and credential storage.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @uipath/auth
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Interactive Login
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { interactiveLogin } from "@uipath/auth";
|
|
17
|
+
|
|
18
|
+
await interactiveLogin({ file: ".uipath" });
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Client Credentials (CI/CD)
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import { clientCredentialsLogin } from "@uipath/auth";
|
|
25
|
+
|
|
26
|
+
const tokens = await clientCredentialsLogin({
|
|
27
|
+
clientId: process.env.CLIENT_ID,
|
|
28
|
+
clientSecret: process.env.CLIENT_SECRET,
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Check Login Status
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { getLoginStatusAsync } from "@uipath/auth";
|
|
36
|
+
|
|
37
|
+
const status = await getLoginStatusAsync({ file: ".uipath" });
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## API
|
|
41
|
+
|
|
42
|
+
| Export | Description |
|
|
43
|
+
| :--- | :--- |
|
|
44
|
+
| `interactiveLogin(options)` | Browser-based authorization code flow with PKCE |
|
|
45
|
+
| `clientCredentialsLogin(props)` | Silent client credentials flow for service accounts |
|
|
46
|
+
| `getLoginStatusAsync(options)` | Check current login status, auto-refreshes expired tokens |
|
|
47
|
+
| `refreshAccessToken()` | Refresh an expired access token |
|
|
48
|
+
| `selectTenant()` | Interactive tenant selection |
|
|
49
|
+
| `loadConfigAsync()` | Resolve auth configuration from environment |
|
|
50
|
+
| `saveEnvFileAsync()` / `loadEnvFileAsync()` | Credential file I/O |
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
See the [root repository](https://github.com/UiPath/uipcli) for license information.
|
package/dist/index.js
CHANGED
|
@@ -25557,7 +25557,7 @@ var interactiveLoginWithDeps = async (options, deps) => {
|
|
|
25557
25557
|
}
|
|
25558
25558
|
const displayData = getOutputFormat() === "table" ? {
|
|
25559
25559
|
UIPATH_URL: credentials.UIPATH_URL,
|
|
25560
|
-
|
|
25560
|
+
UIPATH_ORGANIZATION_NAME: credentials.UIPATH_ORGANIZATION_NAME,
|
|
25561
25561
|
UIPATH_TENANT_NAME: credentials.UIPATH_TENANT_NAME
|
|
25562
25562
|
} : credentials;
|
|
25563
25563
|
OutputFormatter.success({
|
package/package.json
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
2
|
+
"name": "@uipath/auth",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/UiPath/uipcli.git",
|
|
7
|
+
"directory": "packages/auth"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"registry": "https://registry.npmjs.org/"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"maintainers": [
|
|
21
|
+
"aoltean16",
|
|
22
|
+
"mihaigirleanu",
|
|
23
|
+
"vlad-uipath"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "bun build ./src/index.ts --outdir dist --format esm --target node",
|
|
27
|
+
"lint": "biome check ."
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@clack/prompts": "^1.0.1",
|
|
31
|
+
"@uipath/filesystem": "workspace:*",
|
|
32
|
+
"@uipath/common": "workspace:*",
|
|
33
|
+
"openid-client": "^6.8.2",
|
|
34
|
+
"zod": "^4.3.6"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@types/node": "^25.2.3",
|
|
38
|
+
"typescript": "^5"
|
|
39
|
+
}
|
|
40
40
|
}
|