[Error [AuthApiError]: Invalid Refresh Token:

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets, and reproduction steps)

Hi Team Plasmic!

We are getting an error on one of our servers. I think the error might (maybe be coming from our Plasmic studio project). The issue is that we are continuously requesting a token refresh from Supabase so much so that we’ve hit an API request limit.

We aren’t getting the same issue on our dev branch which is linked to a Plasmic project. We only get this issue on staging so my hypothesis is that the request might be coming from something on our Plasmic project.

Please not that our Plasmic auth is linked to our supabase auth.

Here is the error on our server.

2025-03-20T10:49:20.916511892Z [Error [AuthApiError]: Invalid Refresh Token: Refresh Token Not Found] {
2025-03-20T10:49:20.916545852Z   __isAuthError: true,
2025-03-20T10:49:20.916549492Z   status: 400,
2025-03-20T10:49:20.916552052Z   code: 'refresh_token_not_found'
2025-03-20T10:49:20.916554692Z }

and from Supabase

Any hints as to how to debug this would be highly appreciated.

Relevant links:

I switched branches of our plasmic project to dev and the issue went away. I then switch back to staging and so far there aren’t any more api requests.

Not sure why yet. I’ll keep an eye on things.

Hi, this shouldn’t be related to our integrations, we won’t perform requests to /token for your supabase, so I would recommend you to review your own code.

You are right!