---
reference:
  curl:
    - key: password
      id: authenticate_password_user
      url: /reference/authkit/authentication/password
      title: /user_management/authenticate
      type: POST
      parameters:
        - key: client_id
          type: string
          description: (client_id)
        - key: client_secret
          type: string
          description: (client_secret)
        - key: grant_type
          type: '"password"'
          description: (authentication.grant_type)
        - key: email
          type: string
          description: (user.email)
        - key: password
          type: string
          description: (user.password)
        - key: invitation_token
          type: string
          optional: true
          description: (authentication.invitation_token)
        - key: ip_address
          type: string
          optional: true
          description: (authentication.ip_address)
        - key: user_agent
          type: string
          optional: true
          description: (authentication.user_agent)
      returns:
        - key: anonymous
          type: object
          unwrap: true
          properties:
            - key: user
              type: user
              description: (user.self)
            - key: organization_id
              type: string
              optional: true
              description: (authentication.organization_id)
            - key: authentication_method
              type: '"Password"'
              optional: false
              description: (authentication.authentication_method)
  js:
    - key: authenticateWithPassword
      id: authenticate_password_user
      url: /reference/authkit/authentication/password
      title: userManagement.authenticateWithPassword()
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: clientId
              type: string
              description: (client_id)
            - key: email
              type: string
              description: (user.email)
            - key: password
              type: string
              description: (user.password)
            - key: invitationToken
              type: string
              optional: true
              description: (authentication.invitation_token)
            - key: ipAddress
              type: string
              optional: true
              description: (authentication.ip_address)
            - key: userAgent
              type: string
              optional: true
              description: (authentication.user_agent)
            - key: session
              type: object
              optional: true
              unwrap: true
              properties:
                - key: sealSession
                  type: boolean
                  description: (authentication.seal_session)
                - key: cookiePassword
                  type: string
                  optional: true
                  description: (authentication.cookie_password_seal)
      returns:
        - key: anonymous
          type: object
          unwrap: true
          properties:
            - key: user
              type: User
              description: (user.self)
            - key: organizationId
              type: string
              optional: true
              description: (authentication.organization_id)
            - key: authenticationMethod
              type: '"Password"'
              optional: false
              description: (authentication.authentication_method)
            - key: sealedSession
              type: string
              optional: true
              description: (authentication.sealed_session)
  python:
    - key: authenticate_with_password
      id: authenticate_password_user
      url: /reference/authkit/authentication/password
      title: user_management.authenticate_with_password()
      parameters:
        - key: email
          type: str
          description: (user.email)
        - key: password
          type: str
          description: (user.password)
        - key: ip_address
          type: str
          optional: true
          description: (authentication.ip_address)
        - key: user_agent
          type: str
          optional: true
          description: (authentication.user_agent)
      returns:
        - key: anonymous
          type: AuthenticationResponse
          unwrap: true
          properties:
            - key: user
              type: User
              description: (user.self)
            - key: organization_id
              type: str
              optional: true
              description: (authentication.organization_id)
            - key: access_token
              type: str
              optional: false
              description: (authentication.access_token)
            - key: refresh_token
              type: str
              optional: false
              description: (authentication.refresh_token)
  go:
    - key: AuthenticateWithPassword
      id: authenticate_password_user
      url: /reference/authkit/authentication/password
      title: usermanagement.AuthenticateWithPassword()
      parameters:
        - (ctx)
        - key: opts
          type: usermanagement.AuthenticateWithPasswordOpts
          unwrap: true
          properties:
            - key: ClientID
              type: string
              description: (client_id)
            - key: Email
              type: string
              description: (user.email)
            - key: Password
              type: string
              description: (user.password)
            - key: IPAddress
              type: string
              optional: true
              description: (authentication.ip_address)
            - key: UserAgent
              type: string
              optional: true
              description: (authentication.user_agent)
      returns:
        - key: response
          type: object
          unwrap: true
          properties:
            - key: User
              type: User
              description: (user.self)
            - key: OrganizationID
              type: string
              optional: true
              description: (authentication.organization_id)
        - (err)
  php:
    - key: authenticateWithPassword
      id: authenticate_password_user
      url: /reference/authkit/authentication/password
      title: $userManagement->authenticateWithPassword()
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: clientId
              type: string
              description: (client_id)
            - key: email
              type: string
              description: (user.email)
            - key: password
              type: string
              description: (user.password)
            - key: ipAddress
              type: string
              optional: true
              description: (authentication.ip_address)
            - key: userAgent
              type: string
              optional: true
              description: (authentication.user_agent)
      returns:
        - key: anonymous
          type: object
          unwrap: true
          properties:
            - key: user
              type: User
              description: (user.self)
            - key: organizationId
              type: string
              optional: true
              description: (authentication.organization_id)
  ruby:
    - key: authenticate_with_password
      id: authenticate_password_user
      url: /reference/authkit/authentication/password
      title: UserManagement.authenticate_with_password()
      parameters:
        - key: options
          type: object
          unwrap: true
          properties:
            - key: client_id
              type: String
              description: (client_id)
            - key: email
              type: String
              description: (user.email)
            - key: password
              type: String
              description: (user.password)
            - key: ip_address
              type: String
              optional: true
              description: (authentication.ip_address)
            - key: user_agent
              type: String
              optional: true
              description: (authentication.user_agent)
      returns:
        - key: anonymous
          type: object
          unwrap: true
          properties:
            - key: user
              type: User
              description: (user.self)
            - key: organization_id
              type: String
              optional: true
              description: (authentication.organization_id)
  java:
    - key: authenticateWithPassword
      id: authenticate_password_user
      url: /reference/authkit/authentication/password
      title: userManagement.authenticateWithPassword()
      parameters:
        - key: clientId
          type: String
          description: (client_id)
        - key: email
          type: String
          description: (user.email)
        - key: password
          type: String
          description: (user.password)
        - key: options
          type: AuthenticationAdditionalOptionsBuilder
          optional: true
          unwrap: true
          properties:
            - key: invitationToken
              type: String
              optional: true
              description: (authentication.invitation_token)
            - key: ipAddress
              type: String
              optional: true
              description: (authentication.ip_address)
            - key: userAgent
              type: String
              optional: true
              description: (authentication.user_agent)
      returns:
        - key: response
          type: Authentication
          unwrap: true
          properties:
            - key: user
              type: User
              optional: true
              description: (user.self)
            - key: organizationId
              type: String
              optional: true
              description: (authentication.organization_id)
            - key: accessToken
              type: string
              optional: true
              description: (authentication.access_token)
            - key: refreshToken
              type: string
              optional: true
              description: (authentication.refresh_token)
            - key: impersonator
              type: AuthenticationImpersonator
              optional: true
              properties:
                - key: email
                  type: String
                  description: (authentication.impersonator.email)
                - key: reason
                  type: String
                  optional: true
                  description: (authentication.impersonator.reason)
originalPath: >-
  .tmp-workos-clone/packages/docs/content/reference/authkit/authentication/password.mdx
---

## Authenticate a user with password

Authenticates a user with email and password.

<CodeBlock referenceId="authenticate_password_user">
  <CodeBlockTab title="Request" file="authenticate-password-user-request" />
  <CodeBlockTab title="Response" file="authenticate-password-user-response" />
</CodeBlock>
