diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e4c8ba88..deeefbc5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2024-06-27 + +### Changes + +--- + +Packages with breaking changes: + + - There are no breaking changes in this release. + +Packages with other changes: + + - [`deriv_passkeys` - `v0.0.2+7`](#deriv_passkeys---v0027) + - [`deriv_auth` - `v6.7.5`](#deriv_auth---v675) + +Packages with dependency updates only: + +> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project. + + - `deriv_auth` - `v6.7.5` + +--- + +#### `deriv_passkeys` - `v0.0.2+7` + + - **FIX**(deriv_passkeys): Fix_logout_issue_by_fetching_refresh_token ([#630](https://github.com/regentmarkets/flutter-deriv-packages/issues/630)). ([282278ae](https://github.com/regentmarkets/flutter-deriv-packages/commit/282278aeb27256eaa37660f58eff704d27e92c93)) + + ## 2024-06-26 ### Changes diff --git a/README.md b/README.md index 9ddb07b09..b4d1ebbae 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This repository contains private packages & plugins that are used by the company ## Using the packages -Each package has been released as git tag with convention as **packageName-vVersionNumber**`(Example: deriv_auth-v6.7.4)`. To use the package, add the following to your pubspec.yaml file: +Each package has been released as git tag with convention as **packageName-vVersionNumber**`(Example: deriv_auth-v6.7.5)`. To use the package, add the following to your pubspec.yaml file: ```yaml @@ -20,7 +20,7 @@ deriv_ui: | Name | Description | Version | | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | | [analytics](./packages/analytics) | Used to collect and send analytical information to 'Firebase' and 'Segment'. | [v2.0.0](./packages/analytics/CHANGELOG.md) | -| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.7.4 ](./packages/deriv_auth/CHANGELOG.md) | +| [deriv_auth](./packages/deriv_auth) | A Dart package that provides Authentication logic for Deriv applications. | [v6.7.5 ](./packages/deriv_auth/CHANGELOG.md) | | [deriv_banner](./packages/deriv_banner) | A widget to show banner in apps. | [v0.0.1+1](./packages/deriv_banner/CHANGELOG.md) | | [deriv_bloc_manager](./packages/deriv_bloc_manager) | Provides some tools to manage blocs. | [v0.0.1](./packages/deriv_bloc_manager/CHANGELOG.md) | | [deriv_datadog](./packages/deriv_datadog) | A package that helps you monitor the performance and user interactions of your Flutter app by sending data to Datadog. | [v0.0.1](./packages/deriv_datadog/CHANGELOG.md) | diff --git a/packages/deriv_auth/CHANGELOG.md b/packages/deriv_auth/CHANGELOG.md index 4a25283bc..2eca701bc 100644 --- a/packages/deriv_auth/CHANGELOG.md +++ b/packages/deriv_auth/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.7.5 + + - Update a dependency to the latest release. + ## 6.7.4 - Update a dependency to the latest release. diff --git a/packages/deriv_auth/pubspec.yaml b/packages/deriv_auth/pubspec.yaml index e3761df56..69d668e27 100644 --- a/packages/deriv_auth/pubspec.yaml +++ b/packages/deriv_auth/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_auth description: Provides deriv authentication functionalities for dart/flutter apps. -version: 6.7.4 +version: 6.7.5 environment: sdk: ">=3.0.0 <4.0.0" @@ -57,7 +57,7 @@ dependencies: git: url: git@github.com:regentmarkets/flutter-deriv-packages.git path: packages/deriv_passkeys - ref: deriv_passkeys-v0.0.2+6 + ref: deriv_passkeys-v0.0.2+7 deriv_language_selector: git: diff --git a/packages/deriv_passkeys/CHANGELOG.md b/packages/deriv_passkeys/CHANGELOG.md index b079e02df..d156b3fc3 100644 --- a/packages/deriv_passkeys/CHANGELOG.md +++ b/packages/deriv_passkeys/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.2+7 + + - **FIX**(deriv_passkeys): Fix_logout_issue_by_fetching_refresh_token ([#630](https://github.com/regentmarkets/flutter-deriv-packages/issues/630)). ([282278ae](https://github.com/regentmarkets/flutter-deriv-packages/commit/282278aeb27256eaa37660f58eff704d27e92c93)) + ## 0.0.2+6 - Update a dependency to the latest release. diff --git a/packages/deriv_passkeys/lib/src/data/mappers/deriv_passkeys_mapper.dart b/packages/deriv_passkeys/lib/src/data/mappers/deriv_passkeys_mapper.dart index 9404c3987..468a647cf 100644 --- a/packages/deriv_passkeys/lib/src/data/mappers/deriv_passkeys_mapper.dart +++ b/packages/deriv_passkeys/lib/src/data/mappers/deriv_passkeys_mapper.dart @@ -51,6 +51,7 @@ class DerivPasskeysMapper { DerivPasskeysVerifyCredentialsResponseModel model) => DerivPasskeysVerifyCredentialsResponseEntity( token: (model.response['tokens'] as List).first['token'], + refreshToken: model.response['refresh_token'] as String, ); /// Maps [ConnectionInfoEntity] to [PasskeysConnectionInfoModel]. diff --git a/packages/deriv_passkeys/lib/src/domain/entities/deriv_passkeys_verify_credentials_response_entity.dart b/packages/deriv_passkeys/lib/src/domain/entities/deriv_passkeys_verify_credentials_response_entity.dart index 1e249d40a..aeeca7d38 100644 --- a/packages/deriv_passkeys/lib/src/domain/entities/deriv_passkeys_verify_credentials_response_entity.dart +++ b/packages/deriv_passkeys/lib/src/domain/entities/deriv_passkeys_verify_credentials_response_entity.dart @@ -5,11 +5,15 @@ final class DerivPasskeysVerifyCredentialsResponseEntity extends Equatable { /// Creates a [DerivPasskeysVerifyCredentialsResponseEntity]. const DerivPasskeysVerifyCredentialsResponseEntity({ required this.token, + required this.refreshToken, }); - /// contains the token from the REST API to verify credentials. + /// App token from the REST API to verify credentials. final String token; + /// Refresh token from the REST API to verify credentials. + final String refreshToken; + @override - List get props => [token]; + List get props => [token, refreshToken]; } diff --git a/packages/deriv_passkeys/lib/src/presentation/states/bloc/deriv_passkeys_bloc.dart b/packages/deriv_passkeys/lib/src/presentation/states/bloc/deriv_passkeys_bloc.dart index ea167db91..1a8285e7f 100644 --- a/packages/deriv_passkeys/lib/src/presentation/states/bloc/deriv_passkeys_bloc.dart +++ b/packages/deriv_passkeys/lib/src/presentation/states/bloc/deriv_passkeys_bloc.dart @@ -57,6 +57,8 @@ class DerivPasskeysBloc extends Bloc { emit( DerivPasskeysCredentialVerifiedState( token: derivPasskeysVerifyCredentialsResponseEntity.token, + refreshToken: + derivPasskeysVerifyCredentialsResponseEntity.refreshToken, ), ); }).catchError((Object error) { diff --git a/packages/deriv_passkeys/lib/src/presentation/states/bloc/deriv_passkeys_state.dart b/packages/deriv_passkeys/lib/src/presentation/states/bloc/deriv_passkeys_state.dart index e50ae555c..72f3c115e 100644 --- a/packages/deriv_passkeys/lib/src/presentation/states/bloc/deriv_passkeys_state.dart +++ b/packages/deriv_passkeys/lib/src/presentation/states/bloc/deriv_passkeys_state.dart @@ -33,13 +33,19 @@ class DerivPasskeysCreatedSuccessfullyState extends DerivPasskeysState {} /// [DerivPasskeysCredentialVerifiedState] represents the credential verified state within the DerivPasskeys flow. class DerivPasskeysCredentialVerifiedState extends DerivPasskeysState { /// Creates a [DerivPasskeysCredentialVerifiedState]. - const DerivPasskeysCredentialVerifiedState({required this.token}); + const DerivPasskeysCredentialVerifiedState({ + required this.token, + required this.refreshToken, + }); - /// The response. + /// App token from the response. final String token; + /// Refresh token from the response. + final String refreshToken; + @override - List get props => [token]; + List get props => [token, refreshToken]; } /// [DerivPasskeysNotSupportedState] represents the not supported state within the DerivPasskeys flow. diff --git a/packages/deriv_passkeys/pubspec.yaml b/packages/deriv_passkeys/pubspec.yaml index a9dbcf176..db7aed071 100644 --- a/packages/deriv_passkeys/pubspec.yaml +++ b/packages/deriv_passkeys/pubspec.yaml @@ -1,6 +1,6 @@ name: deriv_passkeys description: Deriv Passkeys Flutter Plugin -version: 0.0.2+6 +version: 0.0.2+7 publish_to: "none" environment: diff --git a/packages/deriv_passkeys/test/data/deriv_passkeys_data_source_mock_setup.dart b/packages/deriv_passkeys/test/data/deriv_passkeys_data_source_mock_setup.dart index 221657dae..4fa40b0d0 100644 --- a/packages/deriv_passkeys/test/data/deriv_passkeys_data_source_mock_setup.dart +++ b/packages/deriv_passkeys/test/data/deriv_passkeys_data_source_mock_setup.dart @@ -99,7 +99,8 @@ const DerivPasskeysVerifyCredentialsResponseModel { 'token': 'token', }, - ] + ], + 'refresh_token': 'refresh_token', }, ); diff --git a/packages/deriv_passkeys/test/data/deriv_passkeys_mapper_test.dart b/packages/deriv_passkeys/test/data/deriv_passkeys_mapper_test.dart index 76968b9ea..8d3684c2b 100644 --- a/packages/deriv_passkeys/test/data/deriv_passkeys_mapper_test.dart +++ b/packages/deriv_passkeys/test/data/deriv_passkeys_mapper_test.dart @@ -106,7 +106,8 @@ void main() { { 'token': '', } - ] + ], + 'refresh_token': 'refresh_token', }, ); diff --git a/packages/deriv_passkeys/test/presentation/states/bloc/deriv_passkeys_bloc_setup.dart b/packages/deriv_passkeys/test/presentation/states/bloc/deriv_passkeys_bloc_setup.dart index 0c8e906c7..b293053b5 100644 --- a/packages/deriv_passkeys/test/presentation/states/bloc/deriv_passkeys_bloc_setup.dart +++ b/packages/deriv_passkeys/test/presentation/states/bloc/deriv_passkeys_bloc_setup.dart @@ -31,7 +31,10 @@ void setupDerivPasskeysBloc() { void setupSuccessDerivPasskeysVerifyCredentialEvent() { const DerivPasskeysVerifyCredentialsResponseEntity mockResponseEntity = - DerivPasskeysVerifyCredentialsResponseEntity(token: 'token'); + DerivPasskeysVerifyCredentialsResponseEntity( + token: 'token', + refreshToken: 'refresh_token', + ); when(() => mockDerivPasskeysService.verifyCredential( jwtToken: any(named: 'jwtToken'), diff --git a/packages/deriv_passkeys/test/presentation/states/bloc/deriv_passkeys_state_test.dart b/packages/deriv_passkeys/test/presentation/states/bloc/deriv_passkeys_state_test.dart index cba709665..785c6a623 100644 --- a/packages/deriv_passkeys/test/presentation/states/bloc/deriv_passkeys_state_test.dart +++ b/packages/deriv_passkeys/test/presentation/states/bloc/deriv_passkeys_state_test.dart @@ -34,8 +34,11 @@ void main() { group('DerivPasskeysCredentialVerifiedState', () { test('props should contain token', () { const String token = 'example_token'; - const DerivPasskeysState state = - DerivPasskeysCredentialVerifiedState(token: token); + const String refreshToken = 'example_refresh_token'; + const DerivPasskeysState state = DerivPasskeysCredentialVerifiedState( + token: token, + refreshToken: refreshToken, + ); expect(state.props, contains(token)); }); });