auth0-flutter
auth0-flutter copied to clipboard
Stopped throwing WebAuthenticationException at user cancellation of login flow
Checklist
- [X] The issue can be reproduced in the auth0_flutter sample app (or N/A).
- [X] I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- [X] I have looked into the API documentation and have not found a suitable solution or answer.
- [X] I have searched the issues and have not found a suitable solution or answer.
- [X] I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- [X] I agree to the terms within the Auth0 Code of Conduct.
Description
Seems like the module has stopped throwing WebAuthenticationException on user cancellation of the login flow? This does not work any more:
try {
credentials = await _auth0
.webAuthentication(scheme: dotenv.env["AUTH0_SCHEME"]!)
.login(
parameters: {'screen_hint': 'signup'},
audience: dotenv.env["AUTH0_AUDIENCE"]!,
useEphemeralSession: true);
} on WebAuthenticationException catch (e) {
if (e.code == userCancelled) {
logger.d('User aborted sign up');
return;
}
}
If I cancel the flow, no exception is thrown.
Reproduction
- Run the test app and try to catch
WebAuthenticationExceptionwhen login flow is cancelled - ...
Additional context
No response
auth0_flutter version
1.7.1
Flutter version
3.19.6
Platform
iOS
Platform version(s)
16