Credentials login error

I am trying to add Credentials login. I am putting the code and the error I am getting.
No description
No description
8 Replies
Reptiloid
Reptiloid23h ago
It looks like something is wrong with the imports. Could you share the whole file?
Climax708
Climax70823h ago
share webpack config?
şiar_619
şiar_619OP22h ago
this is the whole file
şiar_619
şiar_619OP22h ago
sorry i couldn't find the webpack config i am new to t3
şiar_619
şiar_619OP22h ago
https://github.com/siarkonyar/loracassi this is the github repo can you look at it if you are available. I can send the file direct if you can tell me the folder it is in
GitHub
GitHub - siarkonyar/loracassi
Contribute to siarkonyar/loracassi development by creating an account on GitHub.
Reptiloid
Reptiloid22h ago
I think you are supposed to use the signIn function on the server, and you are using it on the client. In this example from the authjs docs the server action is used. You can use either server action or api endpoint.
Credentials
Authentication for the Web
No description
şiar_619
şiar_619OP20h ago
how can i use it on the server should i create an endpoint for it?
Reptiloid
Reptiloid16h ago
Yes, you can either create an endpoint or a server action
Data Fetching: Server Actions and Mutations | Next.js
Learn how to handle form submissions and data mutations with Next.js.

Did you find this page helpful?