File tree 3 files changed +22
-1
lines changed
3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ---
Original file line number Diff line number Diff line change @@ -306,5 +306,21 @@ export default (QUnit: QUnit) => {
306
306
redirectAdapterSpy . calledWith ( `https://included.katydid-92.accounts.dev/sign-up?redirect_url=${ encodedUrl } ` ) ,
307
307
) ;
308
308
} ) ;
309
+
310
+ test ( 'returns path based url with development (kima) publishableKey (with staging Clerk) but without signUpUrl to redirectToSignUp' , assert => {
311
+ const redirectAdapterSpy = sinon . spy ( _url => 'redirectAdapterValue' ) ;
312
+ const { redirectToSignUp } = redirect ( {
313
+ redirectAdapter : redirectAdapterSpy ,
314
+ publishableKey : 'pk_test_aW5jbHVkZWQua2F0eWRpZC05Mi5jbGVyay5hY2NvdW50c3N0YWdlLmRldiQ' ,
315
+ } ) ;
316
+
317
+ const result = redirectToSignUp ( { returnBackUrl } ) ;
318
+ assert . equal ( result , 'redirectAdapterValue' ) ;
319
+ assert . ok (
320
+ redirectAdapterSpy . calledWith (
321
+ `https://included.katydid-92.accountsstage.dev/sign-up?redirect_url=${ encodedUrl } ` ,
322
+ ) ,
323
+ ) ;
324
+ } ) ;
309
325
} ) ;
310
326
} ;
Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ function buildAccountsBaseUrl(frontendApi?: string) {
73
73
}
74
74
75
75
// convert url from FAPI to accounts for Kima and legacy (prod & dev) instances
76
- const accountsBaseUrl = frontendApi . replace ( / ( c l e r k \. a c c o u n t s \. | c l e r k \. ) / , 'accounts.' ) ;
76
+ const accountsBaseUrl = frontendApi
77
+ // staging accounts
78
+ . replace ( / ( c l e r k \. a c c o u n t s s t a g e \. ) / , 'accountsstage.' )
79
+ . replace ( / ( c l e r k \. a c c o u n t s \. | c l e r k \. ) / , 'accounts.' ) ;
77
80
return `https://${ accountsBaseUrl } ` ;
78
81
}
You can’t perform that action at this time.
0 commit comments