Hi, in identity.schema.json I have an email field'...
# talk-kratos
f
Hi, in identity.schema.json I have an email field's format set to "email", but /self-service/login/flows returns it as a "text" for some reason, thus email autocomplete is not being applied on client. Is it an issue with Kratos, or I have something misconfigured? Also, does "title" key have any effect at all? Thanks.
m
Hey @faint-energy-48611 The title is used to label the form field, depends on your frontend. The kratos snippet you posted looks fine 🤔 The second image is from your frontend?
f
Hi, that's part of the
/self-service/login/flows?id=blabla
response body
The thing is, I can't even see the "title" being propagated to the flow structure, not only "type": "email"
m
What version of Kratos are you on and how are you running it?
s
can you give the whole flow form response, as well as the whole identity schema?
also, is this the default schema?
f
v0.10.1, browser-based flow
Maybe that's because I also have webauthn enabled? Just a wild guess...
s
hm what is weird is that for the text input there is the meta label with text "ID" this would typically be the title from the schema
just because you call the schema ID default it does not mean it is the default schema btw
f
hmm, how do I make it default then? 😮
s
the schema list should be considered append only, and the IDs should never change
otherwise you break older identities, as they will reference the old schema ID
so don't change, don't remove
f
isn't default_schema_id deprecated? I remember removing it after reading a changelog and replacing with identity.schemas stuff that I've sent previously
s
no,
default_schema_url
was replaced by
default_schema_id
https://github.com/ory/kratos/blob/master/CHANGELOG.md#breaking-changes-3
f
oh, either of them is completely missing from my config
s
In that case I don't really know what Kratos does 😅
f
but still, it defaults to "default", right? According to docs. I'll try putting it back in and let you know.
I've put it there, but nothing has changed :<
Oh, I see what's the problem here. I did in fact change the schema id from "customer" to "default"
So it's broken now and the identities are referencing the old schema, god have mercy
Is there any way to fix it? It'll require some SQL updates, right?
s
you can add both to the list
f
In the correct order? customer first, then default? Should I recover the old "customer" identity schema file too?
or just make them point at the same, up-to-date file?
s
the order does not matter
and both can point to the same file
it's just that the json blob in the db should be valid against the schema
there is currently no way to migrate indentities from an older version to a new one
f
I've added the old schema id and tried it out, but it didn't help 😞 - the identifier type still says "text"
s
can you paste some entries from the identity table? e.g.
Copy code
SELECT * FROM identities LIMIT 1;
and then maybe find and compare the broken/working identities
f
But that's not about broken identities, I have a problem with login flow response that returns wrong form field attributes, it happens even before I login
s
well ok what do you get now
f
Nothing has changed, unfortunately 😕 The response is the same