Skip to content
  • Workflows
  • About workflows

About workflows

In Kinde, workflows exist to give you (almost) unlimited power over how Kinde works for you.

Develop code in your own repo, and push it to a Kinde workflow, where we execute it in ways that you define, triggered by Kinde events.

Currently, you can use the following triggers:

  • user:post_authentication fires after the user has completed single factor authentication (e.g. email + password or Google), and before authorization.
  • m2m:token_generation - when a request to the token endpoint is made with an M2M application.
  • user:new_password_provided - when a user requests to create or reset a password.
  • user:existing_password_provided - when a user hasn’t signed in, but they have requested to sign in and given their current password.

Coming soon:

  • user:pre_mfa - where the user has completed single factor authentication (e.g. email + password or Google) and determined which organization (if any) they are trying to access.
  • user:tokens_generation - An ID or access token is generated after authentication or refresh token request.

We will add more triggers (and allow you to create your own) as we develop the feature.

When to use a workflow

Link to this section
  • You want Kinde to do something that it doesn’t currently do.
  • You want to customize an access or ID tokens in ways that we don’t support out of the box. For example, you want to fetch data from an external system to include it as claims in your tokens.
  • You want to reduce the size and weight of tokens, remove things that you don’t need.
  • You want to change the data type of a claim. For example changing from an array to a space delimited string.

Basic workflow rules

Link to this section
  • Workflow actions need to be written in TypeScript or plain JavaScript
  • File extensions should be .ts, .js, .tsx or .jsx
  • Each trigger can only have one workflow
  • Only Kinde-defined triggers are available (for now)

Explanation of methods and code helpers

Link to this section

We’ve provided a set of methods and examples in our Infrastructure repo in GitHub. The README contains a guide to creating the code that powers your workflows.