- Merge pull request #89 from passageidentity/PSG-5785
- Merge pull request #85 from passageidentity/PSG-5279
- Merge pull request #83 from passageidentity/PSG-5241
- Merge pull request #78 from passageidentity/PSG-4888
- Merge pull request #61 from passageidentity/PSG-4590
- Merge pull request #56 from passageidentity/PSG-4533
- Merge pull request #52 from passageidentity/PSG-4176
- Merge pull request #45 from passageidentity/PSG-3992
Fixed issue with Android code obfuscation.
- Added new and improved
registerWithPasskey
andloginWithPasskey
methods. - Deprecated
login
andregister
methods.
final identifier = '[email protected]'
// Register a new user with a passkey and optionally provide `PasskeyCreationOptions`.
// These example options will allow a user to register using a physical security key.
final options = PasskeyCreationOptions(
authenticatorAttachment: AuthenticatorAttachment.crossPlatform);
await _passage.registerWithPasskey(identifier, options);
// Log in using a passkey and optionally pass a user identifier.
await _passage.loginWithPasskey(identifier);
Update Passage Android dependency.
Users can now log in to a Passage app using Social Login. Upon successful login using passage.authorizeWith, Passage Flutter will save the user's tokens to device.
const connection = PassageSocialConnection.github
// Web and Android
// Step 1: Send user to Social Login page
passage.authorizeWith(connection);
// Step 2: When Social Login page redirects to your app, extract the auth code to finish login
final uri = Uri.parse(YOUR_REDIRECT_URI);
final code = uri.queryParameters['code'];
final authResult = await passage.finishSocialAuthentication(code);
// iOS
// iOS handles the process in a single step.
final authResult = await passage.authorizeIOSWith(connection);
This release release deprecates PassageAppInfo.authFallbackMethod
in favor of PassageAppInfo.authMethods
and fixes an issue with token validation for web apps.
This release adds identifierExists
method.
Developers can use this method to check if a user with a given identifier (ie email or phone number) exists. Additionally, developers can check the user's status, whether they have registered a passkey, etc.
Example usage:
final userInfo = await _passage.identifierExists('[email protected]');
if (userInfo == null) {
// User does not exist, show an error message.
} else if (userInfo?.webauthn == true) {
// User exists and has a passkey. Try logging in with a passkey.
} else {
// Try another auth method like a one-time passcode, if applicable
}
This release also includes a new error code: PassageErrorCode.otpActivationExceededAttempts
, thrown when a user attempts to activate a one-time passcode too many times.
This release adds passkey support for devices running Android 14.
This release includes changes to make app configuration easier.
When you create an instance of the Passage class, you can set your Passage app id like this:
final passage = PassageFlutter("ABCDEF123456");
If you decide to pass your app id in this way, you no longer need the following configuration steps:
- the entire
Passage.plist
file for your iOS app - the
passage_app_id property
in yourstrings.xml
file in your Android app - the
window.passageAppId
set in your index.html file for your web app
- Initial Flutter SDK release.