When you created the client in Keycloak, you set the required field "Valid Redirect URIs". Most likely, the template that you entered there does not correspond to the redirected uri that you send from your client. If you use port numbers, they must match too!
, , Keycloak , .