Skip to content

Commit 45647ab

Browse files
committed
Fix redirectUrl for SSO with SignIn
1 parent 203e66d commit 45647ab

File tree

1 file changed

+4
-2
lines changed
  • packages/clerk-js/src/core/resources

1 file changed

+4
-2
lines changed

packages/clerk-js/src/core/resources/SignIn.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ export class SignIn extends BaseResource implements SignInResource {
249249
params: AuthenticateWithRedirectParams,
250250
navigateCallback: (url: URL | string) => void,
251251
): Promise<void> => {
252-
const { strategy, redirectUrl, redirectUrlComplete, identifier, oidcPrompt, continueSignIn } = params || {};
252+
const { strategy, redirectUrlComplete, identifier, oidcPrompt, continueSignIn } = params || {};
253253
const actionCompleteRedirectUrl = redirectUrlComplete;
254254

255+
const redirectUrl = SignIn.clerk.buildUrlWithAuth(params.redirectUrl);
256+
255257
if (!this.id || !continueSignIn) {
256258
await this.create({
257259
strategy,
@@ -264,7 +266,7 @@ export class SignIn extends BaseResource implements SignInResource {
264266
if (strategy === 'saml' || strategy === 'enterprise_sso') {
265267
await this.prepareFirstFactor({
266268
strategy,
267-
redirectUrl: SignIn.clerk.buildUrlWithAuth(redirectUrl),
269+
redirectUrl,
268270
actionCompleteRedirectUrl,
269271
oidcPrompt,
270272
});

0 commit comments

Comments
 (0)