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

Do not refresh token on every request and cache verified ones #3014

Draft
wants to merge 3 commits into
base: staging
Choose a base branch
from

Conversation

cesarvarela
Copy link
Collaborator

@cesarvarela cesarvarela commented Aug 10, 2024

Copy link

codecov bot commented Aug 10, 2024

Codecov Report

Attention: Patch coverage is 85.33333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 91.41%. Comparing base (a00a3ba) to head (7747cbd).
Report is 1 commits behind head on staging.

Files Patch % Lines
site/gatsby-site/server/context.ts 81.66% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #3014      +/-   ##
===========================================
- Coverage    96.79%   91.41%   -5.39%     
===========================================
  Files           30      110      +80     
  Lines         8680    10971    +2291     
  Branches       121      882     +761     
===========================================
+ Hits          8402    10029    +1627     
- Misses         278      878     +600     
- Partials         0       64      +64     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

async function getUserFromHeader(header: string, client: MongoClient) {
async function getTokenCache(token: string, client: MongoClient) {
const db = client.db('customData');
const collection = db.collection('tokenCache');
Copy link
Collaborator

Choose a reason for hiding this comment

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

drive-by: let's discuss how to cache tokens before creating a DB collection for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants