Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to login with username identifier if username has upper case letters #814

Closed
NickUfer opened this issue Nov 8, 2020 · 0 comments · Fixed by #815
Closed

Unable to login with username identifier if username has upper case letters #814

NickUfer opened this issue Nov 8, 2020 · 0 comments · Fixed by #815

Comments

@NickUfer
Copy link
Contributor

NickUfer commented Nov 8, 2020

Describe the bug

Users are unable to login with an identifier which is not an email and which has upper case letters at registration. They would have to enter their identifier in lowercase letters to login.

Reproducing the bug

  • Define another identifier which is not an email. For this example use "username"
  • Create an account with a username with upper case letters, for example "TestAccount"
  • Try to login with "TestAccount" as the identifier. This will not work, but "testaccount" will

Identity Schema:

{
  "$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Person",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "title": "E-Mail",
          "minLength": 3,
          "ory.sh/kratos": {
            "credentials": {
              "password": {
                "identifier": true
              }
            },
            "verification": {
              "via": "email"
            },
            "recovery": {
              "via": "email"
            }
          }
        },
        "username": {
          "type": "string",
          "title": "Username",
          "minLength": 3,
          "ory.sh/kratos": {
            "credentials": {
              "password": {
                "identifier": true
              }
            }
          }
        }
      },
      "required": [
        "email",
        "username"
      ],
      "additionalProperties": false
    }
  }
}

Expected behavior

Users should be able to login with all their identifiers regardless of case.

Environment

  • Version: ddcffff
  • Environment: Ubuntu, Docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants