Client component with Ant Design Form and server side cookies
Unanswered
Texas leafcutting ant posted this in #help-forum
Texas leafcutting antOP
Hi community, this is my first post, I just feel frustrated because I have researched a lot and don't find any answer to implement this. I have a private API, I just need to show a form with Ant design forms (mandatory) and server actions feature doesn't work with Antd Forms. So I need to know if there is a way to process the login with a client component with Antd (using onSubmit) and can take the token from the response and save it on the server using cookies (from next/headers), and on this way use the Bearer token on the rest of the endpoints on the app on the server side?
I don't know if I'm crazy or something, but I just don't find any answer about this.
Thanks a lot! Hope you can help me!
I don't know if I'm crazy or something, but I just don't find any answer about this.
Thanks a lot! Hope you can help me!
3 Replies
European sprat
This is all very possible although I haven't used Ants Forms so I have no idea if there's something special with those that would cause issues
Texas leafcutting antOP
Yes, the only thing that come to my mind is use a routing handler when receive the response from server... so I save the token on the cookies and redirect the user
So that is working right now, but I don't know if this is a good approach