React fresh token

In using react login widget, I found that the accessToken is automatically renewed when it expires, and in the network he sends a request. I want to know what mechanism he uses to detect the token expiration and refresh the token, and I want to find the code related location reference. Can anyone give advice to help?

Our JS SDKs have an autoRenew option that is enabled by default. This autorenewal behavior is triggered based on the event subscriptions for the tokenManager that are issued when the token is about to expire (30 seconds before by default)