Skip to content

How to change auth error Location header #12060

Closed Answered by Nubebuster
Nubebuster asked this question in Help
Discussion options

You must be logged in to vote

sigh I copied and adapted the source code to fit my needs and I now use this custom route handler to handle logins.

Sometimes I do wonder if I should just write things myself. Nextauth makes me spend so much time digging on how to customize it for my needs that I might as well implement everything myself...

[Update] on the positive side, next auth is open source. So I can reimplement things myself easily!

import { redirect } from "next/navigation";
import { type NextRequest } from "next/server";

import { type Prisma } from "@prisma/client";
import { addDays } from "date-fns";
import { cookies } from "next/headers";
import { createHash } from "~/server/auth";
import { db } from "~/server/db"

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Nubebuster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant