Debounce for rolling session updates

We use authentication for all our api endpoints, which are serverless functions. Making requests to them causes rolling session to be updated more than needed in very short periods of time, so I’d like to know if there is any configuration option for auth0 package that I can use to mitigate that?

P.S. We’re using nextjs in our application and we could save a decent amount of calls to our session store, if this is resolved.

Hi @vitalii.tsimbolynets,

Welcome to the Auth0 Community and sorry for replying late.
If you are making lots of requests to the /authorize endpoint you might quickly have to deal with a rate limit issue, but as you have mentioned lots of request might be made unnecessarily. For that reason you can implement silent authentication, but also check our Knowledge article about this.

Additionally you can also check out this github thread that talks about rolling sessions in NextJs.

Best regards,
Remus

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.