---
question: How do I switch Nexus between password and email code sign-in?
kind: task
via_web: na
via_cli: na
via_python: na
via_api: na
via_config: available
ref_config: nexus_config.auth_password_enabled
next:
  - /capabilities/get-started/sign-in
  - /capabilities/build/applications/nexus
---

# Choose sign-in method

The login page reads `/api/auth/config` at runtime. `auth_password_enabled` under the `naas_abi` module's `nexus_config` decides whether the form asks for a password or sends a 6-digit code (and a magic link) by email.

## Web UI

Not applicable. There is no Settings screen for this flag. Edit `config.yaml` or `config.local.yaml` and restart the API, as on the Config tab.

## CLI

Not applicable. No `abi` command toggles sign-in mode.

## Python

Not applicable.

## REST API

Not applicable.

## Config

### Set the flag

Under `modules:` → `naas_abi` → `config` → `nexus_config`:

```yaml title="config.yaml"
modules:
  - module: naas_abi
    enabled: true
    config:
      nexus_config:
        auth_password_enabled: true
```

Set it to `false` for email code and magic link only. A generated project uses `true` in `config.yaml` and `config.local.yaml` so the first login works without SMTP.

### Restart the API

Apply the change with `abi dev down` then `abi dev up`, or `docker compose restart abi` on the Docker stack. No Nexus frontend rebuild is required.

### Email when password is off

With `auth_password_enabled: false`, sign-in codes go through the configured email adapter. Local development can use a filesystem mailbox instead of SMTP. Steps and sample YAML are on [Nexus: password or magic link](/capabilities/build/applications/nexus#password-login-vs-magic-link).
