Closed KingUgochukwu closed 1 year ago
Hi @KingUgochukwu, thanks for raising this.
Can you reproduce this in the sample app?
@Widcket Thanks for your response. I have noticed that this behavior is replicable in the example only if I specify the audience for the login request.
if (kIsWeb) {
return auth0Web.loginWithRedirect(
redirectUrl: 'http://localhost:8081',
audience: dotenv.env['AUTH0_AUDIENCE']);
}
Running on the sample app I actually get logs for this issue.
ChromeProxyService: Failed to evaluate expression 'GetTokenSilentlyOptions': InternalError: Expression evaluation in async frames is not supported. No frame with index 16..
Error: login_required: Multifactor authentication required
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49 throw_
packages/auth0_flutter/src/web/auth0_flutter_plugin_real.dart 128:7 credentials$
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 60:31 <fn>
dart-sdk/lib/async/zone.dart 1665:54 runBinary
dart-sdk/lib/async/future_impl.dart 162:22 handleError
dart-sdk/lib/async/future_impl.dart 779:46 handleError
dart-sdk/lib/async/future_impl.dart 800:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 575:5 [_completeError]
dart-sdk/lib/async/future_impl.dart 666:7 callback
FYI, the MFA has already been successfully completed by the user when this message comes in and this only comes about if the audience is specified. Logging in with a popup utilizing the same audience value does not lead to any issues.
Thanks for your time
Hi @KingUgochukwu, please check out https://github.com/auth0/auth0-flutter/issues/298#issuecomment-1663066140.
Closing as I think the above answers your question. Please feel free to ping if you'd prefer to reopen.
Checklist
Description
Hello Auth0 devs,
I am having an issue where I am unable to load the credentials after using the redirect method on the Auth0Web class and need some guidance on how to solve this issue
To start my auth process on web I call the login and attempt to return my credentials like this. I expect the credentials if its successful or an exception on failure.
I also run the onLoad function on when the app is loaded to attempt to get the redirect
Would like to know if there is something I am doing wrong with the implementation of this method
returns null
and
return _auth0Web.credentials();
always throws a │ ⛔ login_required: Multifactor authentication required exception
even after the user has completed the MFA in the redirect redirect.
using popups works without a hitch
Reproduction
Additional context
No response
auth0_flutter version
^1.2.1
Flutter version
3.7.10
Platform
Web
Platform version(s)
No response