Unfortunately, I tried what was stated here but it didn't work: the server log is as follows:
[INF] The authorization request was successfully extracted: { "code_challenge": "kkiB6iXdmWKYxGOagIAzfhJVSuPiLeoqv3aNK_m3N_E", "code_challenge_method": "S256", "redirect_uri": "portalsystem://", "client_id": "PortalSystem_Mobile", "response_type": "code", "state": "0NPRzIbaCF", "scope": "offline_access PortalSystem" }. [INF] Client validation failed because 'portalsystem://' was not a valid redirect_uri for PortalSystem_Mobile. [INF] The authorization request was rejected because the redirect_uri was invalid: 'portalsystem://'.
The definition named PortalSystem_Mobile that I added from the applications section did not work. I added it to appsetiing.json as follows. I was able to run it locally but I am having problems in the production environment.
"IdentityServer": { "Clients": { "PortalSystem_Mobile": { "ClientId": "PortalSystem_Mobile", "ClientName": "PortalSystem Mobile App", "AllowedGrantTypes": [ "authorization_code" ], "RequireClientSecret": false, "RequirePkce": true, "RedirectUris": [ "portalsystem://" ], "PostLogoutRedirectUris": [ "portalsystem://" ], "AllowedScopes": [ "openid", "profile", "email", "offline_access", "PortalSystem" ], "AllowOfflineAccess": true, "AllowedCorsOrigins": ["portalsystem://"], "AccessTokenLifetime": 3600 } }, "ApiResources": { "PortalSystem": { "Scopes": [ "PortalSystem" ], "UserClaims": [ "role", "email", "name" ] } }, "ApiScopes": { "PortalSystem": { "Description": "Portal system API access" } } },