Many organizations have a requirement that when a new user logs in for the first time, they need to agree to the terms and conditions of the website.
First you need to enable the required action on the Keycloak server admin console:
Then you'll have to do something like this.