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

feat: device auth #9

Merged
merged 8 commits into from
Jan 22, 2021
Merged

feat: device auth #9

merged 8 commits into from
Jan 22, 2021

Conversation

jfatta
Copy link
Contributor

@jfatta jfatta commented Jan 22, 2021

Add device Auth to the CLI
more context: https://auth0.slack.com/archives/C01KGNSRS4C/p1611331425054200

Screen.Recording.2021-01-22.at.15.52.53.mov

@jfatta jfatta requested a review from cyx January 22, 2021 18:59
Copy link
Contributor

@cyx cyx left a comment

Choose a reason for hiding this comment

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

Lint, and as discussed, you can add the jwt decode parsing to extract the tenant, otherwise :shipit:

func (a *Authenticator) getDeviceCode(ctx context.Context) (*deviceCodeResponse, error) {
data := url.Values{
"client_id": {clientID},
"scope": {"openid read:roles"},
Copy link

Choose a reason for hiding this comment

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

scope should be a const openid profile read:clients create:clients...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done. Let's extend the scope needed as we add new operations.

@jfatta
Copy link
Contributor Author

jfatta commented Jan 22, 2021

I'll add the welcome message in this PR as well

@jfatta jfatta merged commit 3d453ad into main Jan 22, 2021
@jfatta jfatta deleted the feat-device-auth branch January 22, 2021 21:10
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