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

Allow passing OTP token through command line #144

Open
entropitor opened this issue Jul 30, 2020 · 3 comments
Open

Allow passing OTP token through command line #144

entropitor opened this issue Jul 30, 2020 · 3 comments

Comments

@entropitor
Copy link

Expected Behavior

It would be nice if we could pass the OTP token (and the otp_device) through the CLI args / env variable (so e.g. you can run a script to get a token an pass it to this tool, without needing interactive input)

Current Behavior

Interactive prompt where it's not using the actual name of the OTP device but the type (e.g. I get twice Google Authenticator even though I gave them different names)

Possible Solution

Allow passing token and otp device through CLI

Context (Environment)

Allow hooking 1password-cli with this tool to not have to copy paste the token

@slycoder
Copy link
Contributor

You can set otp_device via the similarly named config parameter.

Would it work to do something like: generate_token.sh | onelogin-aws-login

@entropitor
Copy link
Author

@slycoder That would work.

Regarding the device, the problem is that I get this prompt (and I want the 2nd one), setting the otp_device to "Google Authenticator" picks the wrong one

image

@vandycknick
Copy link

Each device has a deviceId that you could use to differentiate: https://developers.onelogin.com/api-docs/2/saml-assertions/generate-saml-assertion

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

No branches or pull requests

3 participants