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

Unnecessary Database Query in /me Endpoint #8

Open
TamasSallai opened this issue Oct 23, 2024 · 0 comments
Open

Unnecessary Database Query in /me Endpoint #8

TamasSallai opened this issue Oct 23, 2024 · 0 comments

Comments

@TamasSallai
Copy link

The /me endpoint performs a database query, even when a valid access token is provided.

In checkTokens:

  • valid access token: Returns only userId
  • expired access token: Validates refresh token and returns userId and user

But then in the meQuery, you query the database for the user anyway. Even if the access token was valid and only the userId is returned.

Am I missing something here?

(I'm not familiar with tRPC and its query caching methods, so maybe there's something I'm not seeing.)

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

No branches or pull requests

1 participant