Kibana 7.17.7 & openid 'redirect_uri' parameter is not a valid

Elasticsearch version:
7.17.7 , same as kibana, FLX 1.1.0

according documentation we should use server.publicBaseUrl instead of searchguard.frontend_base_url but it doesnt work.
Kibana OIDC Quick Start | Security for Elasticsearch | Search Guard (search-guard.com)

Error details: MSIS9224: Received invalid OAuth authorization request. The received 'redirect_uri' parameter is not a valid registered redirect URI for the client identifier: 'urn:apps:kibana:env-project'. Received redirect_uri: 'https://kibana.cz/env-projectauth/openid/login'.

there is a forward slash missing after basePath env-project !!

THIS WORKS:

server.publicBaseUrl: "https://kibana.cz/env-project"
server.basePath: /env-project
searchguard.frontend_base_url: "https://kibana.cz/env-project/"

THIS DOESN’T:

server.publicBaseUrl: "https://kibana.cz/env-project"
server.basePath: /env-project