Skip to content

Commit

Permalink
fix: login page redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Dec 24, 2024
1 parent 36f0d00 commit fedf2af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/server/client/modules/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function Login() {

useEffect(() => {
if (provider && !isCredentialProvider && status === "unauthenticated") {
loginHandler(provider)
loginHandler(provider, "app")
setRedirecting(true)
}
}, [isCredentialProvider, provider, status])
Expand Down Expand Up @@ -135,7 +135,7 @@ export function Login() {
authProvidersConfig[key]?.buttonClassName,
)}
onClick={() => {
loginHandler(key)
loginHandler(key, "app")
}}
>
<i className={cn("mr-2 text-xl", authProvidersConfig[key]?.iconClassName)} />{" "}
Expand Down Expand Up @@ -164,7 +164,7 @@ export function Login() {
<MotionButtonBase
key={key}
onClick={() => {
loginHandler(key)
loginHandler(key, "app")
}}
>
{overrideProviderIconMap[provider.id] ? (
Expand Down Expand Up @@ -228,7 +228,7 @@ const formSchema = z.object({
})

async function onSubmit(values: z.infer<typeof formSchema>) {
const res = await loginHandler("credential", "browser", values)
const res = await loginHandler("credential", "app", values)
if (res?.error) {
toast.error(res.error.message)
return
Expand Down

0 comments on commit fedf2af

Please sign in to comment.