feat: add new auth_request flow for logging in with comfy deploy
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { customAlphabet } from "nanoid";
|
||||
|
||||
export const nanoid = customAlphabet(
|
||||
"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",
|
||||
);
|
||||
const prefixes = {
|
||||
img: "img",
|
||||
vid: "vid",
|
||||
} as const;
|
||||
|
||||
export function newId(prefix: keyof typeof prefixes): string {
|
||||
return [prefixes[prefix], nanoid(16)].join("_");
|
||||
}
|
||||
Reference in New Issue
Block a user