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

Flow's returning "ID" instead of "Email" for label text #3041

Closed
6 tasks done
hyperknot opened this issue Jan 23, 2023 · 5 comments · Fixed by #3645
Closed
6 tasks done

Flow's returning "ID" instead of "Email" for label text #3041

hyperknot opened this issue Jan 23, 2023 · 5 comments · Fixed by #3645
Labels
bug Something is not working.

Comments

@hyperknot
Copy link

Preflight checklist

Describe the bug

I am using the official Email and Password identity template. The template has the label field filled in, saying "Email".

"properties": {
  "email": {
    "type": "string",
    "format": "email",
    "title": "Email",

Kratos still returns a flow UI with "ID" for label text, instead of "Email".

"label":
{
  "id": 1070004,
  "text": "ID",
  "type": "info"
}

Reproducing the bug

  1. Set up Kratos or Ory Network with the official Email and Password ID schema.
  2. Try registration or login
  3. Look at the UI or at the Flow JSON.

Relevant log output

No response

Relevant configuration

No response

Version

0.11.1

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Binary

Additional Context

No response

@hyperknot hyperknot added the bug Something is not working. label Jan 23, 2023
@hyperknot hyperknot changed the title Flow's returning "ID" instead of Email for label text Flow's returning "ID" instead of "Email" for label text Jan 23, 2023
@aeneasr
Copy link
Member

aeneasr commented Jan 23, 2023

Thank you for the report! This is currently a limitation because it’s theoretically possible to have more than one identifier (eg username AND email). However, if only one identifier is set, we should display the right title.

@hyperknot
Copy link
Author

Sorry, my first snippet might have been too short, but of course in the official example there is only one identifier.

@hyperknot
Copy link
Author

I made this workaround for now:

function fixInitialFlow(flow: LoginFlow): LoginFlow {
  for (const node of flow.ui.nodes) {
    if (node.attributes['name'] === 'identifier') {
      node.meta.label.text = 'Email'
    }
  }
  return flow
}

@kmherrmann
Copy link
Contributor

We added this to our backlog and will address it soon!

@filipbekic01
Copy link

This is much needed, our clients are confused with ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants