{
  "schema_version": 2,
  "id": "commands/auth",
  "title": "AUTH",
  "url": "https://redis.io/docs/latest/commands/auth/",
  "summary": "Authenticates the connection.",
  "since": "1.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:21+01:00",
  "page_type": "content",
  "content_hash": "cf5179018cbd688163d06601886fd8c00334a9e179525c037f879e7dee703132",
  "sections": [
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>password</code></summary>\n\nThe password to authenticate with. With `requirepass`, this is the server password; with ACLs, it is the user's password.\n\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>username</code></summary>\n\nThe ACL username to authenticate as. If omitted, the `default` user is used.\n\n</details>"
    },
    {
      "id": "details",
      "title": "Details",
      "role": "content",
      "text": ""
    },
    {
      "id": "security-notice",
      "title": "Security notice",
      "role": "security",
      "text": "Because of the high performance nature of Redis, it is possible to try\na lot of passwords in parallel in very short time, so make sure to generate a\nstrong and very long password so that this attack is infeasible.\nA good way to generate strong passwords is via the [`ACL GENPASS`](https://redis.io/docs/latest/commands/acl-genpass) command."
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`, or an error if the password, or username/password pair, is invalid."
    }
  ],
  "examples": []
}
