Skip to content

Commit f1ccc98

Browse files
authored
chore(clerk-js): Prefer popup flow for .lp.dev origins (#6686)
1 parent 5e94f0a commit f1ccc98

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.changeset/shy-places-grab.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Add `.lp.dev` to list of origins that prefer the popup SSO flow.

packages/clerk-js/src/ui/utils/__tests__/originPrefersPopup.spec.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ describe('originPrefersPopup', () => {
105105
expect(originPrefersPopup()).toBe(true);
106106
});
107107

108+
it('should return true for .lp.dev domains', () => {
109+
mockLocationOrigin('https://preview.lp.dev');
110+
expect(originPrefersPopup()).toBe(true);
111+
112+
mockLocationOrigin('https://app.lp.dev');
113+
expect(originPrefersPopup()).toBe(true);
114+
});
115+
108116
it('should handle HTTPS and HTTP protocols', () => {
109117
mockLocationOrigin('http://localhost.lovable.app');
110118
expect(originPrefersPopup()).toBe(true);

packages/clerk-js/src/ui/utils/originPrefersPopup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const POPUP_PREFERRED_ORIGINS = [
77
'.vusercontent.net',
88
'.v0.dev',
99
'.v0.app',
10+
'.lp.dev',
1011
];
1112

1213
/**

0 commit comments

Comments
 (0)