Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: implement device auth flow for fake idp#11707

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 9 commits intomainfromstevenmasley/fake_device_flow
Jan 22, 2024

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJan 19, 2024
edited
Loading

Device Flow faking

Device flow:https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps

The fake IDP has been used to test all our oauth flows. I introduced a regression (fixed here#11706) because we were not checking theAccept header for the proper mime type. I could have just implemented that check, but I want to implement this for future testing.

Will also implement better error handling to return a better error if this happens again.

Kooha-2024-01-19-11-33-33.mp4

@EmyrkGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@Emyrk and the rest of your teammates onGraphiteGraphite

@EmyrkEmyrkforce-pushed thestevenmasley/fake_device_flow branch fromb72cea9 toda21464CompareJanuary 19, 2024 18:33
Comment on lines 1077 to 1083
_, _ = fmt.Fprint(rw, url.Values{
"device_code": {deviceCode},
"user_code": {flow.userInput},
"verification_uri": {verifyURL},
"expires_in": {strconv.Itoa(int(lifetime.Seconds()))},
"interval": {"3"},
})
Copy link
Member

Choose a reason for hiding this comment

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

Should this use.Encode()? Otherwise it could be printed asmap[device_code:[] ...] or whatever the string representation ofurl.Values is.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Whoops, good catch

@EmyrkEmyrkenabled auto-merge (squash)January 19, 2024 20:12
@EmyrkEmyrkforce-pushed thestevenmasley/fake_device_flow branch fromf88117e to9bc29dbCompareJanuary 22, 2024 20:35
@EmyrkEmyrk merged commit8e0a153 intomainJan 22, 2024
@EmyrkEmyrk deleted the stevenmasley/fake_device_flow branchJanuary 22, 2024 20:46
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 22, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@code-ashercode-ashercode-asher approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Emyrk@code-asher

[8]ページ先頭

©2009-2025 Movatter.jp