Skip to content

Commit

Permalink
Running the ASP.NET Core JWT with Refresh Tokens API Locally
Browse files Browse the repository at this point in the history
Download or clone the tutorial project code from https://github.com/cornflourblue/aspnet-core-3-jwt-refresh-tokens-api
Start the api by running dotnet run from the command line in the project root folder (where the WebApi.csproj file is located), you should see the message Now listening on: http://localhost:4000. Follow the instructions below to test with Postman or hook up with the example Angular application available.
Starting in debug mode
You can also start the application in debug mode in VS Code by opening the project root folder in VS Code and pressing F5 or by selecting Debug -> Start Debugging from the top menu. Running in debug mode allows you to attach breakpoints to pause execution and step through the application code.

Before running in production
Before running in production make sure that you update the Secret property in the appsettings.json file, it is used to sign and verify JWT tokens for authentication, change it to a random string to ensure nobody else can generate a JWT with the same secret and gain unauthorized access to your api. A quick and easy way is join a couple of GUIDs together to make a long random string (e.g. from https://www.guidgenerator.com/).
  • Loading branch information
M.F.M Fazrin committed Jun 17, 2021
1 parent 7f2a88f commit 052475f
Showing 1 changed file with 98 additions and 126 deletions.
Loading

0 comments on commit 052475f

Please sign in to comment.