lemon-student-13425
03/07/2024, 8:18 AMchilly-king-10285
03/07/2024, 8:18 AMchilly-king-10285
03/07/2024, 8:18 AMlemon-student-13425
03/07/2024, 8:32 AMlemon-student-13425
03/07/2024, 8:33 AMchilly-king-10285
03/07/2024, 8:33 AMchilly-king-10285
03/07/2024, 8:33 AMkratos migrate sql
command. Remember, if you encounter any issues during the upgrade process, you can reach out to the community [chat](https://slack.ory.sh/) or start a [discussion](https://github.com/ory/kratos/discussions). Source: [Ory Kratos Upgrade Guide](https://www.ory.sh/docs/kratos/guides/upgrade)lemon-student-13425
03/07/2024, 8:34 AMlemon-student-13425
03/07/2024, 8:34 AMchilly-king-10285
03/07/2024, 8:34 AMchilly-king-10285
03/07/2024, 8:34 AMkratos
binary in the directories listed in your PATH
environment variable. Here are some steps you can take to resolve this: 1. Check if the binary is installed: You can do this by navigating to the directory where you installed the binary and checking if it's there. If you followed the instructions from the [Ory Kratos Installation Guide](https://www.ory.sh/docs/kratos/install), it should be in /opt/kratos/bin
. 2. Check your PATH: The PATH
is a list of directories that your shell searches for executables when you type a command. You can view your PATH
by typing echo $PATH
in your terminal. If the directory containing the kratos
binary is not in your PATH
, you will get a "command not found" error. 3. Add the binary to your PATH: If the kratos
binary is not in your PATH
, you can add it by moving the binary to a directory that is in your PATH
. For example, you can move it to /usr/local/bin
with the following command: bash sudo mv /opt/kratos/bin/kratos /usr/local/bin/
After doing this, you should be able to run the kratos
command from anywhere in your terminal. Remember to replace /opt/kratos/bin/kratos
with the actual path to your kratos
binary if it's different. Source: [Ory Kratos Installation Guide](https://www.ory.sh/docs/kratos/install)lemon-student-13425
03/07/2024, 9:05 AMchilly-king-10285
03/07/2024, 9:05 AMchilly-king-10285
03/07/2024, 9:05 AMpg_trgm
extension is a PostgreSQL extension that provides functions and operators for determining the similarity of alphanumeric text based on trigram matching. The error message "permission denied to create extension" suggests that the PostgreSQL user you're using to run the migration does not have the necessary permissions to create extensions. To resolve this issue, you can grant the necessary permissions to your PostgreSQL user. You can do this by logging into your PostgreSQL database as a superuser (usually the "postgres" user), and then running the following command: sql GRANT CREATE ON DATABASE your_database_name TO your_user_name;
Replace your_database_name
with the name of your database, and your_user_name
with the name of your PostgreSQL user. After running this command, your user should have the necessary permissions to create extensions, and you should be able to run the migration without encountering this error. Please note that this is a general PostgreSQL issue and not specific to Ory Kratos. If you continue to encounter issues, you may want to consult the PostgreSQL documentation or seek help from a PostgreSQL community. Sources: - [PostgreSQL Documentation](https://www.postgresql.org/docs/) - [Ory Kratos Upgrade Guide](https://www.ory.sh/docs/kratos/guides/upgrade)lemon-student-13425
03/07/2024, 4:16 PMchilly-king-10285
03/07/2024, 4:16 PMchilly-king-10285
03/07/2024, 4:16 PMbash docker pull oryd/kratos:v1.1.0
2. Stop and remove the old container: If you have a running container using the old image, you'll need to stop and remove it. You can do this with the following commands: bash docker stop <your-container-id> docker rm <your-container-id>
Replace <your-container-id>
with the ID of your running Kratos container. 3. Run the new image: You can now run the new image with the following command: bash docker run --rm -it oryd/kratos:v1.1.0 help
4. Run the SQL migrations: After updating the Docker image, you'll need to run the SQL migrations to update the database schema to the new version. You can do this with the following command: bash docker -e DSN="{your database URL}" run oryd/kratos:v1.1.0 migrate sql -e
Replace {your database URL}
with the URL of your database. Remember to backup your data before performing the upgrade to prevent any potential data loss. If you encounter any issues during the upgrade process, you can reach out to the community [chat](https://slack.ory.sh/) or start a [discussion](https://github.com/ory/kratos/discussions). Sources: - [Ory Kratos Docker Installation Guide](https://www.ory.sh/docs/kratos/install#docker) - [Ory Kratos Docker Images Guide](https://www.ory.sh/docs/kratos/guides/docker) - [Ory Kratos Upgrade Guide](https://www.ory.sh/docs/kratos/guides/upgrade)lemon-student-13425
03/11/2024, 1:00 PMchilly-king-10285
03/11/2024, 1:00 PMchilly-king-10285
03/11/2024, 1:00 PMlemon-student-13425
03/18/2024, 6:06 PMchilly-king-10285
03/18/2024, 6:06 PMchilly-king-10285
03/18/2024, 6:06 PMreturn_to
URL. 2. An email is sent with a link
or code
method. 3. The user completes the recovery flow by submitting the code
or clicking the link
. 4. The user gets a session and is redirected through the settings
flow. 5. The user submits the settings
flow with an updated password. 6. The user is redirected to the return_to
URL. If you want to show a custom reset password screen, you would need to customize the settings flow to match your desired user interface. This can be done by following the instructions in the [Ory Kratos Custom UI Basic Integration](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration) and [Ory Kratos Custom UI Advanced Integration](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-advanced-integration) guides. Sources: - [Ory Kratos Custom UI Advanced Integration](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-advanced-integration#advanced-redirects) - [Ory Kratos Custom UI Basic Integration](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#submit-recovery-flow)lemon-student-13425
03/20/2024, 4:36 PMchilly-king-10285
03/20/2024, 4:36 PMchilly-king-10285
03/20/2024, 4:36 PMlemon-student-13425
03/22/2024, 10:34 PMchilly-king-10285
03/22/2024, 10:34 PMchilly-king-10285
03/22/2024, 10:35 PMstring
, number
, integer
, boolean
, object
). Use string
for text fields, boolean
for checkbox fields, and integer
or number
for integral or floating-point numbers. For example: json { "$id": "<https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json>", "$schema": "<http://json-schema.org/draft-07/schema#>", "title": "Identity", "type": "object", "properties": { "traits": { "$ref": "#/definitions/traits" } }, "definitions": { "traits": { "type": "object", "properties": { "userType": { "type": "string", "enum": ["customer", "employee"] }, "jobTitle": { "type": "string" }, "companyName": { "type": "string" } } } } }
In this example, userType
is a new field that can be either "customer" or "employee". The jobTitle
and companyName
fields are additional fields that can be added to user profiles. 2. Customize your UI: In your custom UI, you can display different fields based on the user type. For example, in a React application, you might have something like this: jsx {userType === 'employee' && ( <div> <label>Job Title</label> <input type="text" name="jobTitle" /> <label>Company Name</label> <input type="text" name="companyName" /> </div> )}
In this example, the jobTitle
and companyName
fields are only displayed if the user type is "employee". Remember to replace userType
, jobTitle
, and companyName
with your actual field names. Sources: - [Ory Kratos Identity Schema](https://www.ory.sh/docs/kratos/manage-identities/identity-schema) - [Ory Kratos Customize Identity Schema](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#writing-your-first-custom-identity-schema) - [Ory Kratos Custom UI](https://www.ory.sh/docs/getting-started/custom-ui)lemon-student-13425
03/22/2024, 10:38 PMchilly-king-10285
03/22/2024, 10:38 PMchilly-king-10285
03/22/2024, 10:38 PMuserType
field to your identity schema: json { "$id": "<https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json>", "$schema": "<http://json-schema.org/draft-07/schema#>", "title": "Identity", "type": "object", "properties": { "traits": { "$ref": "#/definitions/traits" } }, "definitions": { "traits": { "type": "object", "properties": { "userType": { "type": "string", "enum": ["customer", "employee"] }, // other fields... } } } }
In this example, userType
is a new field that can be either "customer" or "employee". You can adjust this to fit your needs. After defining your identity schema, you can use it when creating or updating identities in Ory Kratos. The user type can then be used in your application to customize the user experience based on the type of user. Sources: - [Ory Kratos Identity Schema](https://www.ory.sh/docs/kratos/manage-identities/identity-schema) - [Ory Kratos Customize Identity Schema](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#writing-your-first-custom-identity-schema)lemon-student-13425
03/22/2024, 10:39 PMchilly-king-10285
03/22/2024, 10:39 PMchilly-king-10285
03/22/2024, 10:39 PMuserType
field to your identity schema: json { "$id": "<https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json>", "$schema": "<http://json-schema.org/draft-07/schema#>", "title": "Identity", "type": "object", "properties": { "traits": { "$ref": "#/definitions/traits" } }, "definitions": { "traits": { "type": "object", "properties": { "userType": { "type": "string", "enum": ["customer", "employee"] }, // other fields... } } } }
In this example, userType
is a new field that can be either "customer" or "employee". You can adjust this to fit your needs. If you need to store more complex data structures or need to perform complex queries on the data, you might consider using a separate database or service to store this data. You can then link this data to your Ory Kratos identities using a unique identifier, such as the identity ID. Sources: - [Ory Kratos Identity Schema](https://www.ory.sh/docs/kratos/manage-identities/identity-schema) - [Ory Kratos Customize Identity Schema](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#writing-your-first-custom-identity-schema)lemon-student-13425
03/25/2024, 1:20 PMchilly-king-10285
03/25/2024, 1:20 PMchilly-king-10285
03/25/2024, 1:20 PMlemon-student-13425
03/25/2024, 1:22 PMchilly-king-10285
03/25/2024, 1:22 PMchilly-king-10285
03/25/2024, 1:22 PMbash ory create project --name "OAuth2 Server - Example Corp" # Note down the project ID export project_id=your-project-id # replace with your project ID ory create oauth2-client --project "$project_id" \ --name "Example Corp" \ --grant-type authorization_code,refresh_token \ --response-type code \ --scope openid,offline_access,email \ --redirect-uri <https://your-project-slug.projects.oryapis.com/self-service/methods/oidc/callback/H1o_k--i> # replace with your redirect URI
2. Connect your apps to the SSO provider: With the SSO provider set up, you can now connect your apps to it. OAuth2-enabled apps can sign in users via the SSO provider using the OAuth2 authorization code flow. 3. Implement social sign-in in your apps: In your apps, you can implement social sign-in using the Ory Console or the Ory CLI. You can follow the steps provided in the Ory documentation for adding social sign-in providers like [Twitter](https://www.ory.sh/docs/kratos/social-signin/x-twitter), [Facebook](https://www.ory.sh/docs/kratos/social-signin/facebook), or [Auth0](https://www.ory.sh/docs/kratos/social-signin/auth0) to your project. Remember to replace your-project-id
and <https://your-project-slug.projects.oryapis.com/self-service/methods/oidc/callback/H1o_k--i>
with your actual project ID and redirect URI. Sources: - [Ory Kratos Social Sign-in](https://www.ory.sh/docs/kratos/social-signin/ory) - [Ory Kratos Social Sign-in with Twitter](https://www.ory.sh/docs/kratos/social-signin/x-twitter) - [Ory Kratos Social Sign-in with Facebook](https://www.ory.sh/docs/kratos/social-signin/facebook) - [Ory Kratos Social Sign-in with Auth0](https://www.ory.sh/docs/kratos/social-signin/auth0)lemon-student-13425
03/25/2024, 1:24 PMchilly-king-10285
03/25/2024, 1:24 PMchilly-king-10285
03/25/2024, 1:24 PM