Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OTP support to grant-type password #1174

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jsalatiel
Copy link

Add support to ask for a OTP if the grant-type is set to password.

@RefluxMeds
Copy link

Hi @jsalatiel,

not a maintainer here but was just looking for a way to do OTP with Kubelogin. I saw you forked it and implemented your own version. Would it make sense for you to fix the failing tests in the PR and then we can ping the maintainer to have a look at it?

I'd love to have OTP support from this repo! 💯

@jsalatiel
Copy link
Author

I will see what i can do.

@RefluxMeds
Copy link

If you need any support on it don't hesitate to ping here, otherwise thank you so much :)

@RefluxMeds
Copy link

@jsalatiel is it possible to move this?
@int128 are you open to this feature?

ctx = c.wrapContext(ctx)
token, err := c.oauth2Config.PasswordCredentialsToken(ctx, username, password)
token, err := c.oauth2Config.PasswordCredentialsToken(ctx, username, password, otp)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that https://pkg.go.dev/github.com/golang/oauth2#Config.PasswordCredentialsToken does not accept the 4th argument.

I could not find any description of OTP in the Resource Owner Password Credentials Grant. Is it possible to send the OTP parameter in the token request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants