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

feat: refresh access token on expiration #151

Closed sutterj closed 3 months ago

sutterj commented 3 months ago

Pull Request

Proposed Changes

Readiness Checklist

Author/Contributor

Reviewer

zkoppert commented 3 months ago

I don't see it here but may have missed it, if refreshing the token for the user doesn't work should we be clearing the session so they are logged out instead of left in the hanging state described in #30 ?

sutterj commented 3 months ago

I don't see it here but may have missed it, if refreshing the token for the user doesn't work should we be clearing the session so they are logged out instead of left in the hanging state described in #30 ?

We don't have to clear the session. The middleware that we have forces the user to be authed and the check in AuthProvider.tsx signs the user out is expired or if we don't have a session. The AuthProvider is at the highest possible level so it catches all pages.