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

refactor: simplify OAuth2 authorization flow and use 302 redirects#18923

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

ThomasK33
Copy link
Member

@ThomasK33ThomasK33 commentedJul 20, 2025
edited
Loading

Refactor OAuth2 Provider Authorization Flow

This PR refactors the OAuth2 provider authorization flow by:

  1. Removing theauthorizeMW middleware and directly implementing its functionality in theShowAuthorizePage handler
  2. Simplifying function signatures by removing unnecessary parameters:
    • Removeddb parameter fromShowAuthorizePage
    • RemovedaccessURL parameter fromProcessAuthorize
  3. Changing the redirect status code inProcessAuthorize from 307 (Temporary Redirect) to 302 (Found) to improve compatibility with external OAuth2 apps and browsers. (Technical explanation: we replied with a 307 to a POST request, thus the browser performs a redirect to that URL as a POST request, but we need it to be a GET request to be compatible. Thus, we use the 302 redirect so that browsers turn it into a GET request when redirecting back to the redirect_uri.)

The changes maintain the same functionality while simplifying the code and improving compatibility with external systems.

@ThomasK33ThomasK33 marked this pull request as ready for reviewJuly 20, 2025 08:46
@ThomasK33Graphite App
Copy link
MemberAuthor

ThomasK33 commentedJul 20, 2025
edited
Loading

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ThomasK33ThomasK33force-pushed thethomask33/07-20-refactor_oauth2_simplify_authorization_flow_by_removing_middleware_layer branch fromee2ff90 to6f159c6CompareJuly 20, 2025 08:47
…layerChange-Id: Ieff16b08aeb2cf2357ada11d83fd408cc66c6c5aSigned-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33ThomasK33force-pushed thethomask33/07-20-refactor_oauth2_simplify_authorization_flow_by_removing_middleware_layer branch from6f159c6 to3f20259CompareJuly 20, 2025 14:12
@ThomasK33ThomasK33 merged commit7b06fc7 intomainJul 20, 2025
33 checks passed
@ThomasK33ThomasK33 deleted the thomask33/07-20-refactor_oauth2_simplify_authorization_flow_by_removing_middleware_layer branchJuly 20, 2025 14:22
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJul 20, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@bpmctbpmctbpmct approved these changes

@kylecarbskylecarbsAwaiting requested review from kylecarbs

Assignees

@ThomasK33ThomasK33

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@ThomasK33@bpmct

[8]ページ先頭

©2009-2025 Movatter.jp