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

Set up authentication modes #16

Open
lukeocodes opened this issue Aug 21, 2024 · 1 comment
Open

Set up authentication modes #16

lukeocodes opened this issue Aug 21, 2024 · 1 comment
Assignees

Comments

@lukeocodes
Copy link
Contributor

This will explain how we plan to allow users to get started using the CLI

If the user wants to log in (this is the expected primary workflow);

  • deepgram login will prompt the user to log in via the web using an OAuth2.0 device flow, and the API endpoints we create return a new API key (named "Automated CLI API Key for ") and should write to the config file.

If the user wants to manually set their API key into config;

  • deepgram login --api_key=<your key> should write to the config file (should not read from the environment variable - as this is potentially confusing where the value might come from)

To support users who prefer environment driven credentials (and CI workflows) they should be able use parameters and environment variables.

  • any command including --api_key=<your key> or a DEEPGRAM_API_KEY environment variable should just work
@lukeocodes lukeocodes self-assigned this Aug 21, 2024
@lukeocodes lukeocodes added this to the Deepgram CLI v0 milestone Aug 21, 2024
@lukeocodes
Copy link
Contributor Author

lukeocodes commented Aug 21, 2024

Create a device flow client and server solution

  1. client deepgram login will request a device code
  2. community will create device code and return it
  3. the device code is part of a URL that the CLI will prompt the end user to go to
  4. the CLI will then start to poll (continuously request from) the community site for an api key in the background
  5. the user completes the device code flow on the community site
  6. the CLI then gets an api key and stores it as config

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

1 participant