Testing it up

In order to test up the token refresh feature, we need to (drastically) reduce the access token ExpirationInMinutes that we set in the appsettings.json and appsettings.Development.json files. We can start with a value of 60 for the appsettings.json file--as it will be an appropriate time for production--and a temporary 1 value for the appsettings.Development.json file so that we'll be able to quickly check out whether what we did actually works.

Once done, we can launch the application in debug mode and wait until we see the Home view; from there, it's mandatory that we perform a logout/login before everything else, to ensure that the refresh token will be added to our localStorage. As soon as we do that, we can pick an existing quiz from the Home view and access the QuizEditComponent by clicking on the Edit button. Wait a little more than one minute, and then click on the Apply Changes button; that should trigger the whole token refresh workflow, which we can easily debug with the Visual Studio interface by placing the appropriate breakpoints within the various .NET Core and Angular methods we have added.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.246.223