mirror of
https://github.com/sonr-io/sonr.git
synced 2026-09-16 23:16:25 +00:00
75 lines
2.7 KiB
Plaintext
75 lines
2.7 KiB
Plaintext
---
|
|
title: snrd auth register
|
|
description: Register a new decentralized identity using WebAuthn/Passkey authentication
|
|
---
|
|
|
|
Register a new decentralized identity using WebAuthn/Passkey authentication.
|
|
|
|
This command will:
|
|
1. Start a local auth server
|
|
2. Open your browser for WebAuthn credential creation
|
|
3. Create a DID document with your WebAuthn credential
|
|
4. Auto-create a DWN vault for data storage
|
|
|
|
## Usage
|
|
|
|
```shell
|
|
snrd auth register [flags]
|
|
```
|
|
|
|
## Flags
|
|
|
|
<TypeTable
|
|
type={{
|
|
"username": { type: "string", required: true, description: "Username for the new identity" },
|
|
"auto-vault": { type: "boolean", default: "true", description: "Automatically create vault for DID" },
|
|
"webauthn": { type: "boolean", default: "true", description: "Use WebAuthn for registration" },
|
|
"help": { type: "boolean", description: "Help for register" },
|
|
}}
|
|
/>
|
|
|
|
## Global Flags
|
|
|
|
<TypeTable
|
|
type={{
|
|
"broadcast-mode": { type: "string", default: "sync", description: "Transaction broadcasting mode (sync|async)" },
|
|
"chain-id": { type: "string", description: "Specify Chain ID for sending Tx" },
|
|
"fees": { type: "string", description: "Fees to pay along with transaction (e.g., 10aatom)" },
|
|
"from": { type: "string", description: "Name or address of private key with which to sign" },
|
|
"gas-adjustment": { type: "float", default: "1", description: "Adjustment factor to be multiplied against the estimate returned by the tx simulation" },
|
|
"gas-prices": { type: "string", description: "Gas prices to determine the transaction fee (e.g., 10aatom)" },
|
|
"home": { type: "string", default: "~/.sonr", description: "Directory for config and data" },
|
|
"keyring-backend": { type: "string", default: "os", description: "Select keyring's backend" },
|
|
"log_format": { type: "string", default: "plain", description: "The logging format (json|plain)" },
|
|
"log_level": { type: "string", default: "info", description: "The logging level" },
|
|
"log_no_color": { type: "boolean", description: "Disable colored logs" },
|
|
"node": { type: "string", default: "tcp://localhost:26657", description: "Tendermint RPC interface for this chain" },
|
|
"trace": { type: "boolean", description: "Print out full stack trace on errors" },
|
|
}}
|
|
/>
|
|
|
|
## Examples
|
|
|
|
### Basic registration
|
|
|
|
```shell
|
|
snrd auth register --username alice
|
|
```
|
|
|
|
### Registration without auto vault creation
|
|
|
|
```shell
|
|
snrd auth register --username alice --auto-vault=false
|
|
```
|
|
|
|
### Registration with custom chain ID
|
|
|
|
```shell
|
|
snrd auth register --username alice --chain-id sonrtest_1-1
|
|
```
|
|
|
|
## See Also
|
|
|
|
- [snrd auth](./snrd_auth) - User authentication with Passkeys
|
|
- [snrd auth login](./snrd_auth) - Login with WebAuthn authentication
|