()
| 1 | import { v4 as uuidv4 } from "uuid"; |
| 2 | |
| 3 | export function generateApiKey(): string { |
| 4 | /** |
| 5 | * Generate a version 4 UUID which can be used as an API key and appends 'sfk'. |
| 6 | * Version 4 UUIDs are sufficiently random for our purposes. |
| 7 | * sfk stands for SuperFlows Key **/ |
| 8 | // |
| 9 | return "sfk-" + uuidv4(); |
| 10 | } |