Instructions to upgrade to Flutter plugin version 3.0.0
https://developer.onewelcome.com/flutter/plugin/v2-0#instructions-to-upgrade-to-flutter-plugin-version-to-20Instructions to upgrade to Flutter plugin version to 3.0.0
-
Event handling
- Events are now sent through event streams, see Event handling for more details. In order to receive events, the events will need to be handled using these streams. See v3.x for a map of old method to new event name.
- eventOther openPinAuthenticator and eventError can be safely removed.
-
Error codes
- Several wrapper error codes have been changed and have now received constants to match their codes. If your code contained hardcoded error codes in the past you should use these constants instead. See Error handling and
onegini/errors/error_codes.dart
for more details.
- Several wrapper error codes have been changed and have now received constants to match their codes. If your code contained hardcoded error codes in the past you should use these constants instead. See Error handling and
-
All methods that previously required a BuildContext no longer require this and those arguments can be removed.
-
The following methods had their arguments or return type adjusted and will need to be updated.
-
Several methods now no longer return a boolean to indicate success/failure but instead resolve/reject based on their result. These uses will need to be updated.
- setPreferredAuthenticator now only resolves instead of returning boolean
- deregisterBiometricAuthenticator now only resolves instead of returning boolean
- logout now only resolves instead of returning boolean
- authenticateDevice now only resolves instead of returning boolean
- validatePinWithPolicy now only resolves instead of returning boolean
- authenticateUserImplicitly now only resolves instead of returning string
- deregisterUser now only resolves instead of returning boolean
-
handleRegisteredUserUrl now takes a non-nullable string as argument for the url
-
Custom registration
- Custom registration's submitSuccessAction now no longer requires Identity-provider ID
- Custom registration's submitErrorAction now no longer requires Identity-provider ID
-
Pin registration
- OneginiPinRegistrationCallback.acceptAuthenticationRequest now only accepts a pin(String) as an argument.
-
Resource requests
- Resource requests have been renamed
getUnauthenticatedResource
torequestResourceUnauthenticated
getResourceAnonymous
torequestResourceAnonymous
getResource
torequestResourceAuthenticated
getResourceImplicit
torequestResourceImplicit
- Resource requests have been renamed
-
Mobile authentication
- Enrolling is now required before using mobile authentication with enrollMobileAuthentication.
mobileAuthWithOtp
has been renamed tohandleMobileAuthWithOtp
-
Pin and Biometric authentication
- You no longer have to specify the platform specific authenticatorId for biometric authentication. Instead you can call authenticateUser with
OWAuthenticatorType.biometric
as an argument. - Methods for getting all authenticators have been removed in favour of getPreferredAuthenticator and getBiometricAuthenticator which can be used to see if a user has biometricAuthenticator registered.
- Registering and deregistering a biometric authenticator can now be done using registerBiometricAuthenticator and deregisterBiometricAuthenticator.
- Setting the preferred authenticator with setPreferredAuthenticator now also takes a
OWAuthenticatorType
as an argument instead of a string
- You no longer have to specify the platform specific authenticatorId for biometric authentication. Instead you can call authenticateUser with