Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Append ingress-https-port to the issuer field in OAuth token requests
By default, the OpenShift library uses the URL from /.well-known/oauth-authorization-server without including the custom port set by the user on CRC. This omission causes errors when writing new contexts to kubeconfig, as the token request fails due to the missing port number. Since users configure this custom port for their CRC instance, this commit ensures the issuer field includes the ingress-https-port before making the token request. The default library function SetDefaultOsinConfig fetches OAuth metadata from the /.well-known/oauth-authorization-server endpoint, which returns the issuer URL without the user's custom port number. To prevent token request failures, the new local function requestTokenWithChallengeHandlers appends the custom port to the issuer URL.
- Loading branch information