supertokens-auth-react
supertokens-auth-react copied to clipboard
Repeated email verification refresh calls when the backend is not running
We are calling user/email/verify GET 5 times when:
- the user is already logged in
- hasn't completed email verification
- loads the email verification page
To resolve, we want to implement 2 improvements:
- Skip adding the email verification validator from web-js if we are already adding it in auth-react
- Add a global, in-memory cooldown for each refresh function. In the shouldRefresh calls we should check this cooldown by default and limit refresh calls to no more than 1 per second.