Is there an API to search identity by email address? #2379
-
I'm using a default schema with identityBody := kratos.NewAdminCreateIdentityBody("default", map[string]interface{}{
"email": input.Email(),
"customTrait": customTrait,
})
identity, httpResp, err := r.kratos.V0alpha2Api.AdminCreateIdentity(ctx).AdminCreateIdentityBody(*identityBody).Execute() IT WORKS AMAZIGLY! QuestionSometimes there are duplicate email addresses and of course kratos returns an error with code 409. Great. What I would like, however, is to find the ID of that duplicate email and it would be amazing to have that ID in 409 response (for ADMIN API only). There is currently no way to do this, right? One way I think is to call the "Admin List identitites" method and Obviously it is a very slow method compared to a dedicated API. I'm doing it wrong? Are new APIs planned? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hello @frederikhors, such an API is indeed in the works: #1671 |
Beta Was this translation helpful? Give feedback.
-
http://127.0.0.1:4434/admin/[email protected] Kratos does not return user even with above email user exist but + sign in email creating issue to find user I have checked anybody know how to find user with email contain + sign. |
Beta Was this translation helpful? Give feedback.
-
Just to spare other people from going through 3 PRs, please see #2783. |
Beta Was this translation helpful? Give feedback.
See the changelog entry: https://changelog.ory.sh/announcements/an-api-to-fetch-identities-by-email-or-username