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: improve error handling for device code exchange failure#11708

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

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJan 19, 2024
edited
Loading

What this does

Error handling on device code exchanges now:

  • Looks at header for github rate limit info to specify how long to wait for.
  • Checks forapplication/x-www-form-urlencoded header which means our requestAccept header was not checked
  • If all else fails, return status code and mime type info for debugging.

This was all information we wanted when debugging the failures from github, so it's all valuable info that can be hit in prod.

Test extra

Implemented a test to show how to use the new idp device flow. Honestly in practice, the current method is easier, so using this is a bit overkill. I mainly implemented it so I can test the UI, which is much harder to mock up.

This does actually run our device auth flow in a unit test though, which has value, so I am going to keep it.

Notes

I noticed we have the UI poll for the device auth to finish, I wonder if we should just do this with a websocket on the FE, and have the BE control the rate of request.

@EmyrkGraphite App
Copy link
MemberAuthor

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stackon Graphite.
Learn more

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

Join@Emyrk and the rest of your teammates onGraphiteGraphite

@EmyrkEmyrk changed the titlechore: work on unit test for device authchore: implement a unit test for device auth with fake idpJan 19, 2024
@EmyrkEmyrk marked this pull request as ready for reviewJanuary 19, 2024 18:11
@EmyrkEmyrk changed the titlechore: implement a unit test for device auth with fake idpchore: improve error handling for device code exchange failureJan 19, 2024
@EmyrkEmyrkforce-pushed thestevenmasley/fake_device_flow branch fromb72cea9 toda21464CompareJanuary 19, 2024 18:33
@EmyrkEmyrkforce-pushed thestevenmasley/device_flow_response_type branch from6229dc1 to7bf5f67CompareJanuary 19, 2024 18:33
@EmyrkEmyrk merged commitf88117e intostevenmasley/fake_device_flowJan 19, 2024
@EmyrkEmyrk deleted the stevenmasley/device_flow_response_type branchJanuary 19, 2024 20:12
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 19, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@kylecarbskylecarbskylecarbs 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@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp