Skip to content

Move speaker token generation to Directus hook#130

Merged
denbec merged 1 commit intomainfrom
denbec/fix-speaker-flow-to-hook
Feb 6, 2026
Merged

Move speaker token generation to Directus hook#130
denbec merged 1 commit intomainfrom
denbec/fix-speaker-flow-to-hook

Conversation

@denbec
Copy link
Collaborator

@denbec denbec commented Feb 6, 2026

Summary

Replaces the broken "Generate Speaker Portal Token" Directus Flow with a dedicated hook that runs in the extension bundle. The flow was failing with "require is not defined" because Directus 11 runs flow scripts in an ESM context where CommonJS APIs aren't available.

The new speaker-token hook automatically generates portal_token, portal_token_expires, and portal_submission_status when speakers are created, using Node's crypto module which is available in the extension context.

Changes

  • New speaker-token/index.ts hook with crypto-secure token generation
  • Registered hook in extension bundle package.json
  • Removed flow creation from setup-flows.mjs (existing flows should be deleted manually in Directus UI)

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Feb 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
programmierbar-website Ready Ready Preview, Comment Feb 6, 2026 4:47pm

Request Review

Replace the "Generate Speaker Portal Token" flow (which fails with "require is not defined" in ESM context) with a dedicated speaker-token hook that runs in the extension bundle where crypto is available. This hook automatically generates portal_token, portal_token_expires, and portal_submission_status when speakers are created. Removes the broken flow from setup-flows.mjs.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@denbec denbec force-pushed the denbec/fix-speaker-flow-to-hook branch from 1815281 to 756f9c0 Compare February 6, 2026 16:41
@denbec denbec merged commit 96dbb82 into main Feb 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant