The token URL is where you can get a token.
Instead of hard-coding the token URL in the application scripts, we will specify the token URL in an INI file, so that the URL can be modified without affecting the scripts.
Step 1: Create an INI file in the same location as the PBT file and name it CloudSetting.ini.
Step 2: Specify the URL for requesting the token from the Amazon Cognito server in the INI file.
In this example, TokenURL points to the "/connect/token" API of the built-in Cognito server, and the Cognito server root URL is the same as the root URL of PowerServer Web APIs (for example, http://localhost:5099/). If you change the PowerServer Web APIs URL, change the URL here accordingly.
[Setup] TokenURL=http://localhost:5099/connect/token
The built-in Cognito server has the same root URL as PowerServer Web APIs, therefore you can also use the GetPowerServerURL method to get and use the root URL, instead of specifying the URL in the INI file.
Note
The INI file must be added as external file in the PowerServer project painter, in order to be deployed with the application. For more details, refer to the next section "Modifying and re-deploying the PowerServer project".