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

fix: middleware race condition when checking auth validity #162

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

ajhenry
Copy link
Contributor

@ajhenry ajhenry commented Jun 11, 2024

Pull Request

Proposed Changes

There was a missing await that caused a race condition in our trpc auth middleware. We would throw an authorization error after we already called next on the middleware.

This corrects that and fixes the auth.

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run npm run lint and fix any linting issues that have been introduced
  • run npm run test and run tests
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, maintenance, or breaking

@ajhenry ajhenry requested a review from a team as a code owner June 11, 2024 18:46
@ajhenry ajhenry added the bug Something isn't working label Jun 11, 2024
@ajhenry ajhenry added fix bug Something isn't working and removed bug Something isn't working feature labels Jun 11, 2024
@ajhenry ajhenry changed the title feat: fix middleware race condition when checking auth validity fix: middleware race condition when checking auth validity Jun 11, 2024
@ajhenry ajhenry removed the feature label Jun 11, 2024
Copy link
Contributor

@jmeridth jmeridth left a comment

Choose a reason for hiding this comment

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

Paired live.

@ajhenry ajhenry merged commit d9da3fa into main Jun 11, 2024
15 checks passed
@ajhenry ajhenry deleted the ajhenry/middleware branch June 11, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants