Multifactor authentication required error when trying to use getAccessTokenSilently function #411
Closed
6 tasks done
Labels
bug
This points to a verified bug in the code
Checklist
Description
Context:
I have an app that uses this library and the universal login and the login/logout/refresh system has been working fine.
I am trying to allow users to turn on MFA on their settings page and then be prompted for the code only when signing in, and not when they are using the app after they are already authenticated. The enable MFA part is working. For the login part, we use an action to check and only conditionally require mfa if they have it set up.
Problem:
The
getAccessTokenSilently
functionality always fails saying it requires mfa, even after the user has already logged in with mfa.Now the user can set up mfa and log in with it fine, but then every request for a token will result in an error saying mfa required.
I used logs to try to debug the action. When I copy the event from the log and then use that JSON for testing inside the action, it works with no error. However, when I use it from the application, it fails.
I found several threads about this on the Auth0 help forum as well as issues inside some other SDKs (for React and Angular) but they did not help to resolve the issue. Example: auth0/auth0-angular#296
Reproduction
This problem occurs for all users with mfa setup.
getAccessTokenSilently
function and it will fail with an error sayingMultifactor authentication required
.Additional context
Here is the code for the action (when I check logs for this action, the variables all come out as expected):
auth0-vue version
2.3.3
Vue version
3.2.29
Which browsers have you tested in?
Chrome, Firefox, Other
The text was updated successfully, but these errors were encountered: