Github auth provider kubectl (token) login

I try to setup a secure authentication against the cluster (via kubectl) with SSO (Github + 2factor, as the provider in my case). However I am not able to start the login flow after I have set a TTL to these tokens as describe here: https://rancher.com/docs/rancher/v2.x/en/api/api-tokens/

What I already figured out is that I may have to supply the --auth-provider argument to the kubeconfig file. To debug this further I directly used the rancher-cli to generate the token for me by issuing the following command:

rancher token --server my-rancher.com --user some-user – auth-provider github

Executing this command will display the login prompt in the shell (for username and password). I expect that rancher will open a browser window which then will run me trough the github login flow. But this does not happend. It fails with “FATA[0007] error logging in: code: [NotFound] message:[failed to find schema githubs]” if I enter my github credentials in the shell.

I somehow have the feeling that I completely miss the point. Especially strange as I was not able to find anything in your documentation (or googling).

Thanks

1 Like

I’m trying to do the same with google oauth. Any luck?