Hi Folks, I am trying to find documentation for cr...
# talk-kratos
b
Hi Folks, I am trying to find documentation for creating an user identity. This is locally hosted Ory. All could find is https://www.ory.sh/docs/kratos/reference/api#operation/adminCreateIdentity, it seems to be generic example that needs OryAccessToken as admin. Is there a repo with better/simpler examples ? I want to create it with api and not with ory-kratos-client. With api would be a better test since the code looks much similar(logic) across python, Go,.. tests. To be more specific, I understand how browser uses flow-id and CSRF cookie for user registration. For api end point, it should send similar info without CSRF token but just "traits" and "schema_id".
a
If your kratos instance is local the admin api is not directly secured. You can just POST against this endpoint as described here: https://www.ory.sh/docs/kratos/manage-identities/create-users-identities (Selfhosted Tab)
b
@ambitious-solstice-89744 Thanks for the reply. I was able to hit /admin/identities and got it working. Thanks for bringing up no secure part, was surprised to see this - is there a reason for this? Eventually, we do want to secure these in production but also have admin account active for troubleshooting -> Is there documented way to do this?
a
i think the most common use case in production environments is that kratos is behind a reverse proxy that does the routing. In the simplest case the reverse proxy simply checks a certain header is set