Skip to content

Commit 24be712

Browse files
committed
fix: non prod kinde domains
1 parent 979974d commit 24be712

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/utils/isCustomDomain.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,8 @@ describe("isCustomDomain", () => {
1414
const result = isCustomDomain("test.kinde.com");
1515
expect(result).toEqual(false);
1616
});
17+
it("works on no prod kinde domains", () => {
18+
const result = isCustomDomain("https://stakesocial-dave.au.kinde.com");
19+
expect(result).toEqual(false);
20+
});
1721
});

lib/utils/isCustomDomain.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const isCustomDomain = (domain: string): boolean => {
22
return !domain.match(
3-
/^(?:https?:\/\/)?[a-zA-Z0-9][-a-zA-Z0-9]*\.kinde\.com$/i,
3+
/^(?:https?:\/\/)?[a-zA-Z0-9][.-a-zA-Z0-9]*\.kinde\.com$/i,
44
);
55
};

0 commit comments

Comments
 (0)