Skip to content

Commit 061f7e4

Browse files
committed
update docs
1 parent b8b49fc commit 061f7e4

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

.changeset/tough-apples-attend.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"@redocly/cli": minor
33
---
44

5-
Added login flow based on [OAuth 2.0 Device authorization flow](https://datatracker.ietf.org/doc/html/rfc8628) that uses Reunite API.
5+
Added [OAuth 2.0 Device authorization flow](https://datatracker.ietf.org/doc/html/rfc8628) that enables users to authenticate through Reunite API.

docs/commands/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Linting commands:
2626

2727
Redocly platform commands:
2828

29-
- [`login`](login.md) Login to the Redocly API registry with an access token.
30-
- [`logout`](logout.md) Clear your stored credentials for the Redocly API registry.
29+
- [`login`](login.md) Login to the Redocly API registry with an access token or to the Reunite API.
30+
- [`logout`](logout.md) Clear your stored credentials.
3131
- [`push`](push.md) Push an API description to the Redocly API registry.
3232
- [`push-status`](push-status.md) Track an in-progress push operation to Reunite.
3333

docs/commands/login.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,24 @@ redocly login [--help] [--verbose] [--version]
2222
redocly login --verbose
2323
```
2424

25+
To authenticate using **Reunite** API, use `--next` option.
26+
27+
```bash
28+
redocly login --next
29+
```
30+
31+
Please note that login with **Reunite** API does not allow you to use the `push` command.
32+
2533
## Options
2634

27-
| Option | Type | Description |
28-
| ------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
29-
| --config | string | Specify path to the [configuration file](../configuration/index.md). |
30-
| --help | boolean | Show help. |
31-
| --region, -r | string | Specify which region to use when logging in. Supported values: `us`, `eu`. The `eu` region is limited to enterprise customers. Default value is `us`. |
32-
| --verbose | boolean | Display additional output. |
33-
| --version | boolean | Show version number. |
35+
| Option | Type | Description |
36+
| ------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
37+
| --config | string | Specify path to the [configuration file](../configuration/index.md). |
38+
| --help | boolean | Show help. |
39+
| --region, --residency -r | string | Specify residency of the application. Supported values: `us`, `eu`. The `eu` region is limited to enterprise customers. Default value is `us`. |
40+
| --verbose | boolean | Display additional output. |
41+
| --version | boolean | Show version number. |
42+
| --next | boolean | Authenticate through Reunite API. |
3443

3544
## Examples
3645

packages/cli/src/commands/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function promptClientToken(domain: string) {
1818

1919
export type LoginOptions = {
2020
verbose?: boolean;
21-
region?: Region;
21+
region?: string;
2222
config?: string;
2323
next?: boolean;
2424
};
@@ -40,7 +40,7 @@ export async function handleLogin({ argv, config, version }: CommandArgs<LoginOp
4040
} else {
4141
try {
4242
const region = argv.region || config.region;
43-
const client = new RedoclyClient(region);
43+
const client = new RedoclyClient(region as Region);
4444
const clientToken = await promptClientToken(client.domain);
4545
process.stdout.write(gray('\n Logging in...\n'));
4646
await client.login(clientToken, argv.verbose);

packages/cli/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ yargs
614614
region: {
615615
description: 'Residency of the application. Defaults to US.',
616616
alias: ['r', 'residency'],
617-
choices: regionChoices,
617+
type: 'string',
618618
},
619619
config: {
620620
description: 'Path to the config file.',

packages/cli/src/reunite/api/domains.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export function getDomain(): string {
99
return process.env.REDOCLY_DOMAIN || REUNITE_URLS.us;
1010
}
1111

12-
export function getReuniteUrl(residency?: Region) {
12+
export function getReuniteUrl(residency?: string) {
1313
if (!residency) residency = 'us';
1414

15-
let reuniteUrl: string = REUNITE_URLS[residency];
15+
let reuniteUrl: string = REUNITE_URLS[residency as Region];
1616

1717
if (!reuniteUrl) {
1818
reuniteUrl = residency;

0 commit comments

Comments
 (0)