Next.js Discord

Discord Forum

Redirects to sign in page when trying to sign in

Unanswered
Yellowhead catfish posted this in #help-forum
Open in Discord
Yellowhead catfishOP
When I press the login button,
"use client";

import { signIn } from "next-auth/react";

export const LoginButton = () => {
  return (
    <button
      className="rounded-md bg-blue-500 px-2 py-1 active:scale-95 hover:scale-105 duration-300"
      onClick={() => signIn()}
      title="Login to Korino"
    >
      Login
    </button>
  );
};
, it goes to the /signin page, and once I sign in with a provider, it works but aafter the sign in, it returns to the /signin page again, but it should return to the page that the user was on before the /signin page.

1 Reply

Yellowhead catfishOP
anyone got a clue?