@@ -164,7 +164,7 @@ test.describe('Client handshake @generic', () => {
164
164
expect ( res . headers . get ( 'location' ) ) . toBe (
165
165
`https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
166
166
`${ app . serverUrl } /` ,
167
- ) } ${ devBrowserQuery } `,
167
+ ) } &suffixed_cookies=true ${ devBrowserQuery } `,
168
168
) ;
169
169
} ) ;
170
170
@@ -185,7 +185,9 @@ test.describe('Client handshake @generic', () => {
185
185
} ) ;
186
186
expect ( res . status ) . toBe ( 307 ) ;
187
187
expect ( res . headers . get ( 'location' ) ) . toBe (
188
- `https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent ( `${ app . serverUrl } /` ) } ` ,
188
+ `https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
189
+ `${ app . serverUrl } /` ,
190
+ ) } &suffixed_cookies=true`,
189
191
) ;
190
192
} ) ;
191
193
@@ -207,7 +209,9 @@ test.describe('Client handshake @generic', () => {
207
209
} ) ;
208
210
expect ( res . status ) . toBe ( 307 ) ;
209
211
expect ( res . headers . get ( 'location' ) ) . toBe (
210
- `https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent ( `${ app . serverUrl } /` ) } ` ,
212
+ `https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
213
+ `${ app . serverUrl } /` ,
214
+ ) } &suffixed_cookies=true`,
211
215
) ;
212
216
} ) ;
213
217
@@ -230,7 +234,7 @@ test.describe('Client handshake @generic', () => {
230
234
expect ( res . headers . get ( 'location' ) ) . toBe (
231
235
`https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
232
236
`${ app . serverUrl } /` ,
233
- ) } ${ devBrowserQuery } `,
237
+ ) } &suffixed_cookies=true ${ devBrowserQuery } `,
234
238
) ;
235
239
} ) ;
236
240
@@ -254,7 +258,7 @@ test.describe('Client handshake @generic', () => {
254
258
expect ( res . headers . get ( 'location' ) ) . toBe (
255
259
`https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
256
260
`${ app . serverUrl } /` ,
257
- ) } ${ devBrowserQuery } `,
261
+ ) } &suffixed_cookies=true ${ devBrowserQuery } `,
258
262
) ;
259
263
} ) ;
260
264
@@ -278,7 +282,7 @@ test.describe('Client handshake @generic', () => {
278
282
expect ( res . headers . get ( 'location' ) ) . toBe (
279
283
`https://example.com/clerk/v1/client/handshake?redirect_url=${ encodeURIComponent (
280
284
`${ app . serverUrl } /` ,
281
- ) } ${ devBrowserQuery } `,
285
+ ) } &suffixed_cookies=true ${ devBrowserQuery } `,
282
286
) ;
283
287
} ) ;
284
288
@@ -300,7 +304,9 @@ test.describe('Client handshake @generic', () => {
300
304
} ) ;
301
305
expect ( res . status ) . toBe ( 307 ) ;
302
306
expect ( res . headers . get ( 'location' ) ) . toBe (
303
- `https://example.com/clerk/v1/client/handshake?redirect_url=${ encodeURIComponent ( `${ app . serverUrl } /` ) } ` ,
307
+ `https://example.com/clerk/v1/client/handshake?redirect_url=${ encodeURIComponent (
308
+ `${ app . serverUrl } /` ,
309
+ ) } &suffixed_cookies=true`,
304
310
) ;
305
311
} ) ;
306
312
@@ -324,7 +330,7 @@ test.describe('Client handshake @generic', () => {
324
330
expect ( res . headers . get ( 'location' ) ) . toBe (
325
331
`https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
326
332
`${ app . serverUrl } /` ,
327
- ) } ${ devBrowserQuery } `,
333
+ ) } &suffixed_cookies=true ${ devBrowserQuery } `,
328
334
) ;
329
335
} ) ;
330
336
@@ -346,7 +352,9 @@ test.describe('Client handshake @generic', () => {
346
352
} ) ;
347
353
expect ( res . status ) . toBe ( 307 ) ;
348
354
expect ( res . headers . get ( 'location' ) ) . toBe (
349
- `https://clerk.example.com/v1/client/handshake?redirect_url=${ encodeURIComponent ( `${ app . serverUrl } /` ) } ` ,
355
+ `https://clerk.example.com/v1/client/handshake?redirect_url=${ encodeURIComponent (
356
+ `${ app . serverUrl } /` ,
357
+ ) } &suffixed_cookies=true`,
350
358
) ;
351
359
} ) ;
352
360
@@ -367,7 +375,7 @@ test.describe('Client handshake @generic', () => {
367
375
expect ( res . headers . get ( 'location' ) ) . toBe (
368
376
`https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
369
377
`${ app . serverUrl } /` ,
370
- ) } ${ devBrowserQuery } `,
378
+ ) } &suffixed_cookies=true ${ devBrowserQuery } `,
371
379
) ;
372
380
} ) ;
373
381
@@ -386,7 +394,9 @@ test.describe('Client handshake @generic', () => {
386
394
} ) ;
387
395
expect ( res . status ) . toBe ( 307 ) ;
388
396
expect ( res . headers . get ( 'location' ) ) . toBe (
389
- `https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent ( `${ app . serverUrl } /` ) } ` ,
397
+ `https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
398
+ `${ app . serverUrl } /` ,
399
+ ) } &suffixed_cookies=true`,
390
400
) ;
391
401
} ) ;
392
402
@@ -485,7 +495,9 @@ test.describe('Client handshake @generic', () => {
485
495
} ) ;
486
496
expect ( res . status ) . toBe ( 307 ) ;
487
497
expect ( res . headers . get ( 'location' ) ) . toBe (
488
- `https://clerk.example.com/v1/client/handshake?redirect_url=${ encodeURIComponent ( app . serverUrl + '/' ) } ` ,
498
+ `https://clerk.example.com/v1/client/handshake?redirect_url=${ encodeURIComponent (
499
+ app . serverUrl + '/' ,
500
+ ) } &suffixed_cookies=true`,
489
501
) ;
490
502
} ) ;
491
503
@@ -520,7 +532,9 @@ test.describe('Client handshake @generic', () => {
520
532
} ) ;
521
533
expect ( res . status ) . toBe ( 307 ) ;
522
534
expect ( res . headers . get ( 'location' ) ) . toBe (
523
- `https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent ( `${ app . serverUrl } /` ) } ` ,
535
+ `https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
536
+ `${ app . serverUrl } /` ,
537
+ ) } &suffixed_cookies=true`,
524
538
) ;
525
539
} ) ;
526
540
@@ -543,7 +557,7 @@ test.describe('Client handshake @generic', () => {
543
557
expect ( res . headers . get ( 'location' ) ) . toBe (
544
558
`https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
545
559
`${ app . serverUrl } /` ,
546
- ) } hello%3Ffoo%3Dbar${ devBrowserQuery } `,
560
+ ) } hello%3Ffoo%3Dbar&suffixed_cookies=true ${ devBrowserQuery } `,
547
561
) ;
548
562
} ) ;
549
563
@@ -566,7 +580,7 @@ test.describe('Client handshake @generic', () => {
566
580
expect ( res . headers . get ( 'location' ) ) . toBe (
567
581
`https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
568
582
`${ app . serverUrl } /` ,
569
- ) } hello%3Ffoo%3Dbar`,
583
+ ) } hello%3Ffoo%3Dbar&suffixed_cookies=true `,
570
584
) ;
571
585
} ) ;
572
586
@@ -589,7 +603,7 @@ test.describe('Client handshake @generic', () => {
589
603
} ) ;
590
604
expect ( res . status ) . toBe ( 307 ) ;
591
605
expect ( res . headers . get ( 'location' ) ) . toBe (
592
- `https://${ config . pkHost } /v1/client/handshake?redirect_url=https%3A%2F%2Fexample.com%2Fhello%3Ffoo%3Dbar${ devBrowserQuery } ` ,
606
+ `https://${ config . pkHost } /v1/client/handshake?redirect_url=https%3A%2F%2Fexample.com%2Fhello%3Ffoo%3Dbar&suffixed_cookies=true ${ devBrowserQuery } ` ,
593
607
) ;
594
608
} ) ;
595
609
@@ -612,7 +626,7 @@ test.describe('Client handshake @generic', () => {
612
626
} ) ;
613
627
expect ( res . status ) . toBe ( 307 ) ;
614
628
expect ( res . headers . get ( 'location' ) ) . toBe (
615
- `https://${ config . pkHost } /v1/client/handshake?redirect_url=https%3A%2F%2Fexample.com%2Fhello%3Ffoo%3Dbar` ,
629
+ `https://${ config . pkHost } /v1/client/handshake?redirect_url=https%3A%2F%2Fexample.com%2Fhello%3Ffoo%3Dbar&suffixed_cookies=true ` ,
616
630
) ;
617
631
} ) ;
618
632
@@ -635,7 +649,7 @@ test.describe('Client handshake @generic', () => {
635
649
} ) ;
636
650
expect ( res . status ) . toBe ( 307 ) ;
637
651
expect ( res . headers . get ( 'location' ) ) . toBe (
638
- `https://${ config . pkHost } /v1/client/handshake?redirect_url=https%3A%2F%2Fexample.com%3A3213%2Fhello%3Ffoo%3Dbar${ devBrowserQuery } ` ,
652
+ `https://${ config . pkHost } /v1/client/handshake?redirect_url=https%3A%2F%2Fexample.com%3A3213%2Fhello%3Ffoo%3Dbar&suffixed_cookies=true ${ devBrowserQuery } ` ,
639
653
) ;
640
654
} ) ;
641
655
@@ -658,7 +672,7 @@ test.describe('Client handshake @generic', () => {
658
672
} ) ;
659
673
expect ( res . status ) . toBe ( 307 ) ;
660
674
expect ( res . headers . get ( 'location' ) ) . toBe (
661
- `https://${ config . pkHost } /v1/client/handshake?redirect_url=https%3A%2F%2Fexample.com%3A3213%2Fhello%3Ffoo%3Dbar` ,
675
+ `https://${ config . pkHost } /v1/client/handshake?redirect_url=https%3A%2F%2Fexample.com%3A3213%2Fhello%3Ffoo%3Dbar&suffixed_cookies=true ` ,
662
676
) ;
663
677
} ) ;
664
678
@@ -787,7 +801,7 @@ test.describe('Client handshake @generic', () => {
787
801
expect ( res . headers . get ( 'location' ) ) . toBe (
788
802
`https://${ config . pkHost } /v1/client/handshake?redirect_url=${ encodeURIComponent (
789
803
`${ app . serverUrl } /` ,
790
- ) } &__clerk_db_jwt=asdf`,
804
+ ) } &suffixed_cookies=true& __clerk_db_jwt=asdf`,
791
805
) ;
792
806
} ) ;
793
807
0 commit comments