fix: mark any callback url as valid if they contain a wildcard (#1006)

This commit is contained in:
Elias Schneider
2025-10-07 08:18:53 +02:00
committed by GitHub
parent 694f266dea
commit cbf0e3117d
2 changed files with 7 additions and 7 deletions

View File

@@ -14,9 +14,11 @@ export const callbackUrlSchema = z
.nonempty()
.refine(
(val) => {
if (val === '*') return true;
if (val.includes('*')) {
return true;
}
try {
new URL(val.replace(/\*/g, 'x'));
new URL(val);
return true;
} catch {
return false;