Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-3430: Remove auth-app commands #3911

Merged
merged 5 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions docs/dev/tools/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1438,69 +1438,6 @@ The `whoami` command returns the Viam user for an authenticated CLI session, or
viam whoami
```

### `auth-app`

The `auth-app` command allows you to register, update, and get your web or mobile application (created with the Viam Flutter or TypeScript [SDKs](/dev/reference/sdks/)) with [FusionAuth](https://fusionauth.io/) (the tool Viam uses for authentication and authorization) so that you or other users can log into your app with the same credentials they use to log into the [Viam app](https://app.viam.com).
The user's credentials allow them the same [permissions](/manage/manage/rbac/) to organizations, locations, and machines that they have in the Viam app.

```sh {class="command-line" data-prompt="$" data-output="2-8,10-14"}
viam auth-app register --org-id=<org-id> --application-name=<application-name> --origin-uris=<origin-uris> --redirect-uris=<redirect-uris> --logout-uri=<logout-uri>
viam auth-app update --org-id=<org-id> --application-id=<application-id> --application-name=<application-name> --origin-uris=<origin-uris> --redirect-uris=<redirect-uris> --logout-uri=<logout-uri>
viam auth-app get --org-id=<org-id> --application-id=<application-id>
```

Examples:

```sh {class="command-line" data-prompt="$" data-output="2-8,10-14"}
# register a third party auth application
viam auth-app register --org-id=z1234567-1a23-45a6-a11b-abcdefg1234 --application-name="julias app" --origin-uris=https://test.com,https://test2.com --redirect-uris=https://redirect-url.com--logout-uri=https://logout.com
Info: Successfully registered auth application
{
"application_id": "1234a1z9-ab2c-1234-5678-bcd12345678a",
"application_name": "julias app",
"secret": "supersupersecretsecret"
}

# update a third party auth application
viam auth-app update --org-id=z1234567-1a23-45a6-a11b-abcdefg1234 --application-name="julias app" --application-id=1234a1z9-ab2c-1234-5678-bcd12345678a --redirect-uris=https://test.com,https://test2.com
Info: Successfully updated auth application
{
"application_id": "1234a1z9-ab2c-1234-5678-bcd12345678a",
"application_name": "julias app"
}

# get configuration for a third party auth application
viam auth-app get --org-id=z1234567-1a23-45a6-a11b-abcdefg1234 --application-id=1234a1z9-ab2c-1234-5678-bcd12345678
```

{{% alert title="Caution" color="caution" %}}
Do not share the secret returned by `auth-app register` publicly.
Sharing this information could compromise your system security by allowing unauthorized access to your machines, or to the computer running your machine.
{{% /alert %}}

#### Command options

<!-- prettier-ignore -->
| Command option | Description |
| -------------- | ----------- |
| `register` | Register an [application](https://fusionauth.io/docs/get-started/core-concepts/applications) with FusionAuth |
| `update` | Update your application |
| `get` | Get the configuration of the auth application |

##### Named arguments

The `org-id` and `application-id` are immutable; they cannot be updated with `update` after the application is registered.

<!-- prettier-ignore -->
| Argument | Description | Applicable commands | Required? |
| -------- | ----------- | ------------------- | --------- |
| `--org-id` | The {{< glossary_tooltip term_id="organization" text="organization" >}} ID with which to associate this app. | `register`, `update`, `get` | **Required** |
| `--application-name` | A display name (of your choice) for your application. | `register`, `update` | **Required** |
| `--application-id` | The ID of the application. | `update`, `get` | **Required** |
| `--origin-uris` | All URIs from which valid logins to FusionAuth can originate from. | `register`, `update` | **Required** for `register` |
| `--redirect-uris` | URIs to which FusionAuth will redirect the user upon login. | `register`, `update` | **Required** for `register` |
| `--logout-uri` | URI of page to show user upon logout. | `register`, `update` | **Required** for `register` |

## Global options

You can pass global options after the `viam` CLI keyword with any command.
Expand Down
6 changes: 2 additions & 4 deletions docs/operate/control/mobile-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,11 @@
You can use the mobile app simulator on your development computer to test your app.
The connection code will establish communication with your machine over LAN or WAN.

## Set up user authentication
## Set up user authentication through Viam

Viam uses [FusionAuth](https://fusionauth.io/) for authentication and authorization.

Use the [Viam CLI `auth-app` command](/dev/tools/cli/#auth-app) to register your application with FusionAuth so that you or your users can log into your app with the same credentials they use to log into the [Viam app](https://app.viam.com).

For support building apps with custom login flows, [contact us](mailto:[email protected]).
You can use [use Viam to authenticate end-users](/manage/manage/oauth/) while using a branded login screen.

Check failure on line 98 in docs/operate/control/mobile-app.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/operate/control/mobile-app.md#L98

[write-good.Illusions] 'use' is repeated!
Raw output
{"message": "[write-good.Illusions] 'use' is repeated!", "location": {"path": "docs/operate/control/mobile-app.md", "range": {"start": {"line": 98, "column": 1}}}, "severity": "ERROR"}
npentrel marked this conversation as resolved.
Show resolved Hide resolved

## Next steps

Expand Down
6 changes: 2 additions & 4 deletions docs/operate/control/web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@

You can also host your app on a server or hosting service of your choice.

## Set up user authentication
## Set up user authentication through Viam

Viam uses [FusionAuth](https://fusionauth.io/) for authentication and authorization.

Use the [Viam CLI `auth-app` command](/dev/tools/cli/#auth-app) to register your application with FusionAuth so that you or your users can log into your app with the same credentials they use to log into the [Viam app](https://app.viam.com).

For support building apps with custom login flows, [contact us](mailto:[email protected]).
You can use [use Viam to authenticate end-users](/manage/manage/oauth/) while using a branded login screen.

Check failure on line 58 in docs/operate/control/web-app.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/operate/control/web-app.md#L58

[write-good.Illusions] 'use' is repeated!
Raw output
{"message": "[write-good.Illusions] 'use' is repeated!", "location": {"path": "docs/operate/control/web-app.md", "range": {"start": {"line": 58, "column": 1}}}, "severity": "ERROR"}
npentrel marked this conversation as resolved.
Show resolved Hide resolved
Loading