diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d8e0f5..6dae684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.1.9] - 2026-08-11 + +* Added an optional authorization protocol version to `ExternalLoginData` to allow the server to select the appropriate authentication flow while preserving compatibility with older clients. + ## [0.1.8] - 2026-02-11 * Added new `invalidTime` error with factory method. diff --git a/lib/external_login_interface.dart b/lib/external_login_interface.dart index 77f7fd6..8563d7f 100644 --- a/lib/external_login_interface.dart +++ b/lib/external_login_interface.dart @@ -14,7 +14,7 @@ abstract class ExternalLogin { /// If is't error, than [ErrorResult.error] /// should contains [ExternalLoginErrorData]. /// - /// If [loadAvatar] is `true` than implemention + /// If [loadAvatar] is `true` than implementation /// should request information about user picture. Future> login({bool loadAvatar = false}); @@ -90,6 +90,13 @@ class ExternalLoginData { /// Required by some services, e.g. Apple. final String? clientId; + /// The authorization protocol version used by the client. + /// + /// A null value means that the client does not specify a protocol version. + /// This allows the server to select the appropriate authorization flow + /// based on the available information. + final int? version; + /// Additional data final Map? data; @@ -100,6 +107,7 @@ class ExternalLoginData { this.clientId, this.avatarUrl, this.email, + this.version, this.data, }); @@ -107,7 +115,7 @@ class ExternalLoginData { String toString() { return 'ExternalLoginResult{userId: $userId, token: $token, ' 'fullName: $fullName, clientId: $clientId, avatarUrl: $avatarUrl, ' - 'email: $email, data: $data}'; + 'email: $email, version: $version, data: $data}'; } } diff --git a/pubspec.yaml b/pubspec.yaml index 7378055..23fd37f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: external_login_interface description: Interface for external login feature. -version: 0.1.8 +version: 0.1.9 homepage: https://github.com/innim/ repository: https://github.com/Innim/flutter_external_login_interface issue_tracker: https://github.com/Innim/flutter_external_login_interface/issues