Logging into the TMC Self-Managed UI gives the following error during the login process.
{"message":"Could not exchange authorization code"}
Tanzu Mission Control Self-Managed
This issue can be caused by:
First, verify if the below KB is not applicable.
TMC Self-Managed authentication-server pods in CrashLoopBackOff due to expired tmcsm-issuer CA cert
Then, execute below commands set to do a cleanup and restart the auth-manager, which will resolve the issue.
kubectl -n tmc-local delete oidcclient/client.oauth.pinniped.dev-auth-manager-pinniped-oidc-client
kubectl -n tmc-local secret/client.oauth.pinniped.dev-auth-manager-pinniped-oidc-client-client-secret-generated
kubectl -n tmc-local delete po -lapp=authenticator
kubectl -n tmc-local delete lease authenticator-leader-elect