github-community-projects / private-mirrors

A GitHub App that allows you to contribute upstream using private mirrors of public projects
MIT License
125 stars 13 forks source link

fix: middleware race condition when checking auth validity #162

Closed ajhenry closed 3 months ago

ajhenry commented 3 months ago

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

Reviewer