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

[A0CLI-4] feat: initial implementation of try-login #8

Merged
merged 3 commits into from
Jan 25, 2021
Merged

[A0CLI-4] feat: initial implementation of try-login #8

merged 3 commits into from
Jan 25, 2021

Conversation

paddycarey
Copy link
Contributor

@paddycarey paddycarey commented Jan 22, 2021

https://auth0team.atlassian.net/browse/A0CLI-4

NOTE: This now works, but could probably use some UX/UI love.

image

try-login-demo-4.mov

@paddycarey

This comment has been minimized.

@paddycarey paddycarey changed the title feat: initial implementation of try-login [A0CLI-4] feat: initial implementation of try-login Jan 22, 2021
@paddycarey paddycarey force-pushed the a0cli-4 branch 10 times, most recently from fb13079 to e63f4ae Compare January 25, 2021 21:04
@paddycarey paddycarey marked this pull request as ready for review January 25, 2021 21:06
@paddycarey paddycarey requested a review from cyx January 25, 2021 21:08
internal/auth/exchange.go Outdated Show resolved Hide resolved
internal/auth/user_info.go Outdated Show resolved Hide resolved
internal/cli/try_login.go Outdated Show resolved Hide resolved
m.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
authCode := r.URL.Query().Get("code")
if authCode == "" {
_, _ = w.Write([]byte("<p>&#10060; Unable to extract code from request, please try authenticating again</p>"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can also do fmt.Fprint(w, ...) to avoid the underscore checks IIRC.

internal/cli/try_login.go Outdated Show resolved Hide resolved
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.

Bunch of random non blocking nits, otherwise :shipit:

@cyx
Copy link
Contributor

cyx commented Jan 25, 2021

Hmm, I can't get it to work. What am I doing wrong?

Screen.Recording.2021-01-25.at.2.19.57.PM.mov

@paddycarey
Copy link
Contributor Author

@cyx I added a read:client_keys scope so you may need to log in again to get it

@cyx
Copy link
Contributor

cyx commented Jan 25, 2021

@cyx I added a read:client_keys scope so you may need to log in again to get it

Duh! Works now! smooth like pudding

@cyx cyx merged commit 23ca0c0 into main Jan 25, 2021
@cyx cyx deleted the a0cli-4 branch January 25, 2021 23:59
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.

2 participants