How do you authenticate through a C# Post API and then store the cookies I receive from a successful login

108 Views Asked by At

I'm building a web api app which will ping a remote server with form data and the response will return two cookies which I will need to authenticate all future Get and Post methods. I'm an apprentice so I want to do this the best way possible but I don't know where to start.

1

There are 1 best solutions below

0
On

You can use JWT (JSON Web Token) https://jwt.io/

Send Token to user After login And then use that same Token For all the future Calls

Firstly Understand the Concept of JWT From this link. JWT authentication concept

Example Link

http://www.decatechlabs.com/secure-webapi-using-jwt

JWT authentication for ASP.NET Web API