fix: use current window url instead of app url in frontend

This commit is contained in:
Elias Schneider
2024-11-14 19:10:11 +01:00
parent ff2dd81055
commit 6f45c3b1fb
12 changed files with 24 additions and 56 deletions

View File

@@ -128,9 +128,7 @@ const SignInForm = ({ redirectPath }: { redirectPath: string }) => {
config.get("oauth.disablePassword")
) {
setIsRedirectingToOauthProvider(true);
router.push(
getOAuthUrl(config.get("general.appUrl"), providers.data[0]),
);
router.push(getOAuthUrl(window.location.origin, providers.data[0]));
}
})
.catch(toast.axiosError);
@@ -208,7 +206,7 @@ const SignInForm = ({ redirectPath }: { redirectPath: string }) => {
key={provider}
component="a"
title={t(`signIn.oauth.${provider}`)}
href={getOAuthUrl(config.get("general.appUrl"), provider)}
href={getOAuthUrl(window.location.origin, provider)}
variant="light"
fullWidth
>