You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add configuration for how eagerly to refresh auth tokens (#30588)
I would like this to be configurable so some things like Next.js + Convex Auth can refresh more eagerly than the default.
I made it so that if the configured period is shorter than the token lifetime, we'll just refetch immediately, but we'll log a warning since repeatedly fetching immediately is probably a misconfiguration.
GitOrigin-RevId: 10a9efbeaac3f91ef75f42923ce126e8730eeb41
// Refetch immediately, but this might be due to configuring a `refreshTokenLeewaySeconds`
349
+
// that is too large compared to the token's actual lifetime.
350
+
this.logger.warn(
351
+
`Refetching auth token immediately, configured leeway ${this.refreshTokenLeewaySeconds}s is larger than the token's lifetime ${tokenValiditySeconds}s`,
0 commit comments