From 951356bfa6af49b35c31cf0e0f1cd452fdb3d7ad Mon Sep 17 00:00:00 2001 From: giancarlo Date: Mon, 20 May 2024 02:03:16 +0700 Subject: [PATCH] Remove query parameters from the URL in auth-callback.service The update on auth-callback.service now includes the deletion of 'token_hash', 'type', 'next', and 'callback' query parameters from the URL. This ensures a cleaner URL after the authentication callback process. --- packages/supabase/src/auth-callback.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/supabase/src/auth-callback.service.ts b/packages/supabase/src/auth-callback.service.ts index 92b13cd0c..2bf125d86 100644 --- a/packages/supabase/src/auth-callback.service.ts +++ b/packages/supabase/src/auth-callback.service.ts @@ -45,6 +45,12 @@ class AuthCallbackService { const errorPath = params.errorPath ?? '/auth/callback/error'; + // remove the query params from the url + searchParams.delete('token_hash'); + searchParams.delete('type'); + searchParams.delete('next'); + searchParams.delete('callback'); + url.pathname = next; // if we have an invite token, we append it to the redirect url