Skip to content

Commit

Permalink
Update Docs:CLI related with Account Management (#165)
Browse files Browse the repository at this point in the history
Co-authored-by: Youngteac Hong <[email protected]>
  • Loading branch information
sigmaith and hackerwins authored Sep 9, 2024
1 parent fb95457 commit 286d5cb
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions docs/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,15 @@ Flags:
To use admin commands, you need to log in to the server. You can log in to the server using the `login` subcommand:
```bash
$ yorkie login -u <username> -p <password> --rpc-addr api.yorkie.dev:443
$ yorkie login -u <username> --rpc-addr api.yorkie.dev:443
Enter Password:
```
Username and password are the same as the ones you used to log in to the [dashboard](/dashboard).
The account is the same as the account you use to log in to the [Dashboard](https://yorkie.dev/dashboard).
If you don't have an account, you can create one by signing up at [Dashboard](https://yorkie.dev/dashboard).
> If you are using the [self-hosted server](/docs/self-hosted-server), default username and password are `admin` and `admin`.
> You can log in to the server using `yorkie login -u admin -p admin --insecure`.
> You can log in to the server using `$ yorkie login -u admin -p admin --insecure`. Or: `$ yorkie login -u admin --insecure`.
Once you log in to the server, the CLI stores the access token in the `~/.yorkie/config.json` file.
You can check the context of the CLI using the `context` subcommand:
Expand All @@ -130,16 +132,40 @@ $ yorkie context ls
* localhost:8080 true eyJhbGciOi...FUT3js73Mw
```
If you want to log out from the server, you can use the `logout` subcommand:
### Logout
If you want to log out from the server, you can use the `logout` subcommand:
```bash
$ yorkie logout
$ yorkie context ls
CURRENT RPC ADDR INSECURE TOKEN
* api.yorkie.dev:443 false eyJhbGciOi...DuhaUgofYg
```
### Change Password
If you want to change your password, you can use the command `passwd`.
```bash
$ yorkie passwd -u <username> --rpc-addr api.yorkie.dev:443
Enter Password:
Enter New Password:
```
### Delete Account
If you want to delete your account, you can use the command `delete-account`.
```bash
$ yorkie delete-account -u <username> --rpc-addr api.yorkie.dev:443
Enter Password:
WARNING: ...
```
This command will delete your account and all data associated with it. Please be careful when using this command.
### Project
Project represents your service or application in Yorkie. Separate Projects can exist within a single application. You can add more Projects as needed, for example, if you want to manage [auth webhook](/docs/cli#auth-webhook) and documents for specific purposes.
Expand Down

0 comments on commit 286d5cb

Please sign in to comment.