When the app is verifying access token, it will throw errors right away when it is expired. To prevent this issue, the refresh access token mechanism is implemented. It validates if access token is expired, then refresh it and validate again. If it fails again, then throw errors that are not the TokenExpiredError.
When the app is verifying access token, it will throw errors right away when it is expired. To prevent this issue, the refresh access token mechanism is implemented. It validates if access token is expired, then refresh it and validate again. If it fails again, then throw errors that are not the TokenExpiredError.