Bindings overview
Workflows
The kinde.auth
binding affects the auth flow.
denyAccess(reason: string): void
Prevent the user from accessing the application.
export const workflowSettings = { // ...other settings bindings: {"kinde.auth": {}}};
The Kinde infrastructure library provides a type-safe helper:
import { denyAccess } from "@kinde/infrastructure";
export default async function (event: onUserTokenGeneratedEvent) { if (event.request.ip.startsWith("192")) { denyAccess("You are not allowed to access this resource"); }}
If you’re not using the infrastructure library, you can call the underlying API directly:
kinde.auth.denyAccess("You are not allowed to access this resource");