Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 10 additions & 2 deletions lib/external_login_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<Result<ExternalLoginResult>> login({bool loadAvatar = false});

Expand Down Expand Up @@ -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<String, Object?>? data;

Expand All @@ -100,14 +107,15 @@ class ExternalLoginData {
this.clientId,
this.avatarUrl,
this.email,
this.version,
this.data,
});

@override
String toString() {
return 'ExternalLoginResult{userId: $userId, token: $token, '
'fullName: $fullName, clientId: $clientId, avatarUrl: $avatarUrl, '
'email: $email, data: $data}';
'email: $email, version: $version, data: $data}';
}
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading