diff --git a/src/pkg/index.ts b/src/pkg/index.ts index 83cc1567..9d6bb390 100644 --- a/src/pkg/index.ts +++ b/src/pkg/index.ts @@ -13,10 +13,12 @@ export * from "./logger" export * from "./middleware" export * from "./route" +export type BrowserFlow = "login" | "registration" | "settings" | "recovery" | "verification"; + export const removeTrailingSlash = (s: string) => s.replace(/\/$/, "") export const getUrlForFlow = ( base: string, - flow: string, + flow: BrowserFlow, query?: URLSearchParams, ) => `${removeTrailingSlash(base)}/self-service/${flow}/browser${