Next.js Discord

Discord Forum

CAN'T SIGN IN

Unanswered
DhrishP1 posted this in #help-forum
Open in Discord
I can't signn and the page is only showing error and not the reason for it

31 Replies

are you use Auth.js or develop authentication from scratch?
@DhrishP1 I can't signn and the page is only showing error and not the reason for it
should you return null if no user is found?
@@ts-ignore should you return null if no user is found?
I got my mistake here
lemme send the correct code
any feedback regarding changes should I make for better practices will be very helpful
@DhrishP1 is it?
ig so
not showing any erros on my dev
errors*
yea
you are right
any better alternatives to show message to the user?
@DhrishP1 any better alternatives to show message to the user?
return the error as a json object and handle it accordingly
can you show the syntax
nextresponse does not take full json objects e.g ("message":"wrong pass")
@DhrishP1 can you show the syntax
I've no idea how to do it with authjs
ohhh
should I post another forum?
@@ts-ignore I've no idea how to do it with authjs
How do you perform auth then?
@DhrishP1 How do you perform auth then?
I use my custom backend
never felt the need to use smth like authjs or other third party stuff
I do use it when adding oauth
damnn
nice
next auth is very easy but gotta learn the credentials stuff
oauth is very easy , hardly takes 5 mins
in next-auth