This repository contains a base template TypeScript workflows for Kinde.
Kinde Workflows let you run custom JavaScript/TypeScript logic during the authentication process, giving you full control over:
- User onboarding
- Role and permission assignment
- Profile enrichment
- Custom validation or access control
- Third-party service integration
All code is executed server-side on Kinde, meaning you don’t need to host or deploy anything yourself.
This is the simplest example of a Kinde workflow. It is triggered on the user post authentication event and logs "Hello world" to the console.
- Clone this repo
- Log into your Kinde account
- Connect this repo to Kinde
- Log a user into your app
- Check the runtime logs for the workflow
Use these files as a starting point for your workflows
- Drip feed migration - Shows how to check a password against an external database before creating the user in Kinde.
- Sync passwords to another system - Use encryption keys to securely keep passwords in sync between systems.
- Custom password validation - Shows how to validate a password against your own rules.
- Sync new user data to Hubspot - Send user data and UTM tags to Hubspot when a new user record is created in Kinde.
- Set a grace period for MFA - Don't ask for MFA for a set period of time after a user has logged in.
- Add custom claims to access token - Call an external API to get data to add as custom claims to the user access token.
- Map M2M applications to organizations - Shows how to map M2M applications to organizations. Useful if using Kinde for B2B API key management
- Deny plan change - Prevent a user from changing plans. Useful if they aren't eligible to if in breach of limits
- Deny plan cancellation - Prevent a user from cancelling their plan. Useful if you need to do manual deprovisioning