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.
This commit is contained in:
giancarlo
2024-05-20 02:03:16 +07:00
parent 048ab96cbc
commit 951356bfa6

View File

@@ -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