diff --git a/apps/web/modules/auth/login-view.tsx b/apps/web/modules/auth/login-view.tsx index 80f81741ab..2ea689b837 100644 --- a/apps/web/modules/auth/login-view.tsx +++ b/apps/web/modules/auth/login-view.tsx @@ -256,12 +256,10 @@ PageProps & WithNonceProps<{}>) { CustomStartIcon={} onClick={async (e) => { e.preventDefault(); - const res = await signIn("google", { + setLastUsed("google"); + await signIn("google", { callbackUrl, }); - if (res && !res.error) { - setLastUsed("google"); - } }}> {t("signin_with_google")} {lastUsed === "google" && } diff --git a/packages/features/auth/SAMLLogin.tsx b/packages/features/auth/SAMLLogin.tsx index b6d9ae5153..598d14719b 100644 --- a/packages/features/auth/SAMLLogin.tsx +++ b/packages/features/auth/SAMLLogin.tsx @@ -26,10 +26,8 @@ export function SAMLLogin({ samlTenantID, samlProductID, setErrorMessage }: Prop const mutation = trpc.viewer.public.samlTenantProduct.useMutation({ onSuccess: async (data) => { - const res = await signIn("saml", {}, { tenant: data.tenant, product: data.product }); - if (res && !res.error) { - setLastUsed("saml"); - } + setLastUsed("saml"); + await signIn("saml", {}, { tenant: data.tenant, product: data.product }); }, onError: (err) => { setErrorMessage(t(err.message));