Please include the following information in your post:
Which SDK this is regarding: Auth 0 React
SDK Version: 1.10.20
Platform Version: Windows 11
In an effort to force reissue an access token, I have set ignoreCache to true. I am using refresh tokens and also set my cache location to local storage. The reason I am attempting to force reissue a refresh token is because I would like to refresh the access token before it actually expires. Is the issue caused by setting ignoreCache to true? Thanks in advance for any help.
Here is the error.
err = Error: Multifactor authentication required at new OAuthError
Can this be related to setting the cacheLocation to “local storage”, then setting the ignoreCache option to true when calling getTokenSilently?
If I set the ignoreCache option to false, it works perfectly.
So just to confirm, there is no way to get the token silently when MFA is enabled? MFA is one of our requirements. When I initially login it works. When I try to get a new access token, that’s when I receive an error. Thanks again for your help.
Works like a charm. The only issue that needed to be addressed is detecting if the client is calling getTokenSilently and has a refresh token. In order to check this, we needed to check context.protocol. If refresh token is used, bypass mfa athentication since the refresh token has been granted. We are running node 12 so code may seem a bit outdated.