We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We can validate the shape, verify the signature (if present), and present the developer with a nice API like:
type WebhookEvent = | EmailVerificationRequestedEvent | PasswordResetRequestedEvent; // in `createAuthRouteHandlers` async onWebhook(data: WebhookEvent) { switch (data.event_type) { case "EmailVerificationRequested": { await emails.sendVerification(data.email, data.verification_token); return; } case "PasswordResetRequested": { await emails.sendPasswordReset(data.email, data.reset_token); return; } }
For Next.js we could even automatically wrap this in after so it doesn't block sending the webhook response.
after
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We can validate the shape, verify the signature (if present), and present the developer with a nice API like:
For Next.js we could even automatically wrap this in
after
so it doesn't block sending the webhook response.The text was updated successfully, but these errors were encountered: