How to Fix: The redirect_uri has an invalid domain

How to Fix: The redirect_uri has an invalid domain

Some times we see a problem when deploying Figaf in Cloud Foundry. That you are not able to login to the system

It does not happen always so it can depend on which platform you are using.
To resolve it opent he xs-security.json and add the following. 

In the json make sure you end after role collections with a ,
  1. "oauth2-configuration": {
  2.         "token-validity": 86400,
  3.         "refresh-token-validity": 2592000,
  4.         "redirect-uris":[
  5.             "https://**.cfapps.eu20-001.hana.ondemand.com/**"
  6.         ]  
  7.     }
Make sure you update the uri to your CF domain that you defined in the vars file. 

Save the file and run the command

  1. cf update-service  figaf-xsuaa -c xs-security.json
Now you should be albe to login.
You can work with  url