Skip to content

Commit

Permalink
chore: use absolute URLs in redirect param
Browse files Browse the repository at this point in the history
  • Loading branch information
issuedat committed Oct 18, 2024
1 parent 8b8e460 commit afd7050
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/clerk-js/src/core/clerk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,14 +842,15 @@ export class Clerk implements ClerkInterface {
this.client.cookieExpiresAt &&
this.client.cookieExpiresAt.getTime() - Date.now() <= 8 * 24 * 60 * 60 * 1000 // 8 days
) {
const absoluteRedirectUrl = new URL(redirectUrl, window.location.href);
this.navigate(
this.buildUrlWithAuth(
this.#fapiClient
.buildUrl({
method: 'GET',
path: '/client/touch',
pathPrefix: 'v1',
search: { redirect_url: redirectUrl },
search: { redirect_url: absoluteRedirectUrl.toString() },
})
.toString(),
),
Expand Down

0 comments on commit afd7050

Please sign in to comment.