clerk-sveltekit
clerk-sveltekit copied to clipboard
`protectedPaths` not protecting routes with hyphens
It seems that protectedRoutes
does not seem to work with routes that contain hyphens.
For example, this seems to protect the /create
route:
export const handle: Handle = sequence(
handleClerk(CLERK_SECRET_KEY, {
debug: true,
protectedPaths: ['/create'],
signInUrl: '/sign-in'
})
);
However, this fails to protect the /create-entity
route:
export const handle: Handle = sequence(
handleClerk(CLERK_SECRET_KEY, {
debug: true,
protectedPaths: ['/create-entity'],
signInUrl: '/sign-in'
})
);