okta / okta-cli

Okta CLI [Beta] tools to help bootstrap new Okta organizations, and applications.
Apache License 2.0
90 stars 26 forks source link

Add a command to get an access token for an app #74

Open mraible opened 3 years ago

mraible commented 3 years ago

We use the OIDC debugger in a lot of tutorials and often enable implicit flow to make things faster.

What if we could get an access token from the CLI?!

okta token --app=XXX

Equally as good: generate one from the dashboard.

mraible commented 3 years ago

This would be nice so we don't have to tell people to use oidcdebugger.com.

bdemers commented 3 years ago

I've been thinking about this on and off for a bit.

Client credentials flows should be easy to do like this.

Browser-based flows get tricky because existing redirects would be wrong.

But for most of our blog posts (and i think typical usage of okta token) you would be testing a resource server, and a client creds flow might be all you need, so we might be able to do something like just okta token then:

That might be a bit naive though, we should pick @aaronpk's brain about it too