<@U04UQ68083H> how can I import an OIDC credential...
# ory-copilot
b
@chilly-king-10285 how can I import an OIDC credential into an existing account?
c
A message from kapa.ai
I'm sorry, but the provided knowledge sources do not contain specific information on how to import an OIDC credential into an existing account in Ory. However, Ory does support importing credentials for identities including passwords and social sign-in connections. You can import a clear text password by providing the password in the JSON payload. The password will then be hashed according to the configured password hashing algorithm and stored in the database. The identity will be able to sign in using the provided email and password as credentials. Here is an example of how to import a clear text password:
Copy code
json {    "schema_id": "<preset://email>",    "traits": {    "email": "[[email protected]]"    },    "credentials": {    "password": {    "config": {    "password": "the-password"    }    }    }   }
For more detailed information, you may want to refer to the [Ory documentation](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#importing-credentials).
b
@chilly-king-10285 I need to import and OIDC credential to an existing Kratos account
c
A message from kapa.ai
To import an OIDC credential into an existing Kratos account, you would typically use the Ory Kratos API. However, the provided knowledge sources do not contain specific instructions on how to do this. The API allows you to create and update identities, and the request body for these operations includes a
credentials
field where you can specify OIDC credentials. Here's an example of what the structure looks like:
Copy code
json {   "credentials": {     "oidc": {       "config": {         "config": {           "providers": {             "provider": "The OpenID Connect provider to link the subject to. Usually something like `google` or `github`.",             "subject": "The subject (`sub`) of the OpenID Connect connection. Usually the `sub` field of the ID Token."           }         }       }     }   } }
However, please note that this is a general structure and might need to be adjusted based on your specific needs. For detailed instructions, you should refer to the [Ory Kratos API documentation](https://www.ory.sh/docs/kratos/reference/api).
b
@chilly-king-10285 that API is not working
c
A message from kapa.ai
New message text here