Modifying the authentication template

The AWS Cognito user pool must be provided in the built-in Cognito server so that the PowerServer Web APIs can use it to validate the identity token passed from the client. And if validation is successful, it can get data from the database.

Note

The authentication template will be restored if the "Auth Template" option is changed and the PowerServer C# solution is re-built from the PowerBuilder IDE. Therefore, do not change the "Auth Template" option if you have made changes to the template in the solution (otherwise changes will be lost).

Open the Authentication.json file and specify the AWS Cognito user pool (including region, user pool ID, user pool client ID, and user pool client secret) that will be used to validate the identity token passed from the client.

"AWS": {
    "Region": "us-west-2",
    "UserPoolId": "us-west-2_5wyOzYn1d",
    "UserPoolClientId": "4linbauf6d58b552r6lc3gbpkc",
    "UserPoolClientSecret": "1prlm08gm3aptlokcbai88ekiegff9mqbc98nhebfart5g4a3cr2"
  }