Upgrade to Flutter Complete v1

In the latest update to Passage Flutter, we've introduced several new classes and made structural changes specifically for Flutter development. These updates are designed to provide a more intuitive interface and better alignment with Flutter development best practices.

Handling app_id

v1

Optionally, the app_id was passed from the strings.xml file.

v2

Pass the app_id directly as a string when initializing the Passage instance.

This change simplifies the initialization process and ensures that the app_id is provided explicitly in your code, reducing the potential for errors or misconfigurations.

val passage = PassageFlutter("YOUR_APP_ID");

New interface classes

Flutter v1 has a new interface system that is more robust and aligned with Passage conventions.

Passage class

This is the main entry point for interacting with the SDK. It now provides access to various components like App, Passkey, MagicLink, OTP, Social, and more, each encapsulating specific functionalities related to user authentication.

App class

Handles operations related to the application, such as retrieving app information, checking if a user exists, and creating new users. This centralizes app-specific operations into one cohesive class.

Passkey class

Manages passkey-based authentication, including both registration and login functionalities.

MagicLink class

Facilitates the use of Magic Links for user registration, login, and activation, streamlining the process and making it more accessible.

OTP class

Provides methods for handling one-time passcodes, including registration, login, and activation, making it easier to integrate OTP functionalities.

Social class

Manages social login integrations, providing methods for authorizing and completing authentication with social providers.

CurrentUser class

Offers access to the current user's information and allows operations like changing email or phone, managing passkeys, and updating user metadata.

PassageHosted class

Specifically designed for apps using Passage's hosted authentication method, this class simplifies the process of starting and finishing hosted authentication.

Changes in method access

Methodv0v1
.hosted.start()passage.hostedAuthStartpassage.hosted.start
.hosted.finish()passage.hostedAuthFinishpassage.hosted.finish
.magicLink.activate()passage.magicLinkActivatepassage.magicLink.activate
.magicLink.login()passage.newLoginMagicLinkpassage.magicLink.login
.magicLink.register()passage.newRegisterMagicLinkpassage.magicLink.register
.magicLink.status()passage.getMagicLinkStatuspassage.magicLink.status
.oneTimePasscode.activate()passage.oneTimePasscodeActivatepassage.oneTimePasscode.activate
.oneTimePasscode.login()passage.newLoginOneTimePasscodepassage.oneTimePasscode.login
.oneTimePasscode.register()passage.newRegisterOneTimePasscodepassage.oneTimePasscode.register
.passkey.register()passage.registerWithPasskeypassage.passkey.register
.passkey.login()passage.loginWithPasskeypassage.passkey.login
.passkey.currentUser.userInfo()passage.getCurrentUserpassage.currentUser.userInfo
.passkey.social.authorize()passage.authorizeWithpassage.social.authorize
.passkey.social.finish()passage.finishSocialAuthenticationpassage.social.finish
.passkey.tokenStore.getValidAuthToken()PassageTokenpassage.tokenStore.getValidAuthToken
.passkey.tokenStore.clearAndRevokeTokens()passage.revokeRefreshTokenpassage.tokenStore.clearAndRevokeTokens