Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
Next-Auth: after clicking login redirect to verify doesnt working

i'm implemented email provider authorization with custom signIn form in my next.js app. after clicking login it must redirect to verifyRequest form, but it doesnt. funny moment is that email that confirms login sends and works correctly.

signIn.ejs:

  <form method="POST" action="/api/auth/signin/email">
    <input type="hidden" name="remember" defaultValue="true" />
    <div className="rounded-md shadow-sm -space-y-px">
      <div>
        <label htmlFor="email" className="sr-only">
          Email
        </label>
        <input
          id="email"
          onChange={(e)=>{setEmail(e.target.value)}}
          name="email"
          type="email"
          autoComplete="email"
          required
          placeholder="Email"
        />
      </div>
    </div>

    <div>
      <button
        type="submit"
        onClick={() => signIn("email", { email, callbackUrl } )}
      >
        <span>
          <HiLockClosed />
        </span>
        Login
      </button>
    </div>
  </form>

export async function getServerSideProps(context) {
  try {
    const { req } = context;
    const session = await getSession({ req });
    if (session) {
      return {
        redirect: {
          destination: '/dashboard',
          permanent: false,
        },
      };
    }
  } catch (e) {
    console.error(e);
  }

  return {
    props: { callbackUrl: `${url.client}/dashboard` },
  };
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!