> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xreatlabs.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Permissions Reference

> Complete permission nodes for NexAuth commands and features

# Permissions Reference

Complete list of permission nodes for configuring NexAuth access control.

## Player Permissions

### Basic Authentication

```yaml theme={null}
nexauth.player.login: true
nexauth.player.register: true
nexauth.player.logout: true
nexauth.player.changepassword: true
nexauth.player.unregister: true
```

### Account Management

```yaml theme={null}
nexauth.player.account.info: true
nexauth.player.account.email: true
nexauth.player.account.export: true
nexauth.player.account.delete: true
```

### Two-Factor Authentication

```yaml theme={null}
nexauth.totp.enable: true
nexauth.totp.disable: true
nexauth.totp.verify: true
nexauth.totp.backup-codes: true
```

### Premium Features

```yaml theme={null}
nexauth.premium.status: true
nexauth.premium.link: true
nexauth.premium.unlink: true
nexauth.premium.skin: true
```

## Admin Permissions

### Player Management

```yaml theme={null}
nexauth.admin.account: true
nexauth.admin.changepassword: true
nexauth.admin.unregister: true
nexauth.admin.account.info: true
nexauth.admin.account.delete: true
```

### Session Management

```yaml theme={null}
nexauth.admin.sessions: true
nexauth.admin.sessions.list: true
nexauth.admin.sessions.revoke: true
nexauth.admin.sessions.revoke-all: true
```

### Premium Management

```yaml theme={null}
nexauth.admin.premium: true
nexauth.admin.premium.set: true
nexauth.admin.premium.check: true
nexauth.admin.premium.sync: true
```

### Database Operations

```yaml theme={null}
nexauth.admin.database: true
nexauth.admin.database.backup: true
nexauth.admin.database.restore: true
nexauth.admin.database.optimize: true
```

### Import/Export

```yaml theme={null}
nexauth.admin.import: true
nexauth.admin.export: true
nexauth.admin.import.*: true  # All import types
```

### Configuration

```yaml theme={null}
nexauth.admin.reload: true
nexauth.admin.debug: true
nexauth.admin.stats: true
```

## Wildcard Permissions

### Full Access

```yaml theme={null}
# All player permissions
nexauth.player.*: true

# All admin permissions
nexauth.admin.*: true

# All permissions (use carefully)
nexauth.*: true
```

## Permission Examples

### Default Player

```yaml theme={null}
# Basic authentication
nexauth.player.login: true
nexauth.player.register: true
nexauth.player.logout: true
nexauth.player.changepassword: true

# Account info
nexauth.player.account.info: true

# Optional features
nexauth.totp.enable: true
nexauth.premium.status: true
```

### Moderator

```yaml theme={null}
# Player permissions
nexauth.player.*: true

# Limited admin permissions
nexauth.admin.account.info: true
nexauth.admin.sessions.list: true
nexauth.admin.stats: true
```

### Administrator

```yaml theme={null}
# All permissions
nexauth.*: true
```

## Configuration Integration

### LuckPerms Example

```yaml theme={null}
# groups/default.yml
permissions:
  - nexauth.player.login
  - nexauth.player.register
  - nexauth.player.logout
  - nexauth.player.changepassword
  - nexauth.player.account.info

# groups/admin.yml
permissions:
  - nexauth.*
```

### PermissionsEX Example

```yaml theme={null}
groups:
  default:
    permissions:
    - nexauth.player.login
    - nexauth.player.register
    - nexauth.player.logout
    - nexauth.player.changepassword
  
  admin:
    permissions:
    - nexauth.*
```

## Best Practices

<Checklist>
  * ✅ Grant minimum required permissions
  * ✅ Use wildcard permissions carefully
  * ✅ Regular permission audits
  * ✅ Document custom permission setups
  * ✅ Test permission changes
</Checklist>

## Next Steps

<Card title="API Overview" icon="book" href="/nexauth/api/overview">
  Developer API and integration documentation.
</Card>
