Skip to content

Commit

Permalink
Fixes #135: breaking change in flutter_secure_storage
Browse files Browse the repository at this point in the history
  • Loading branch information
okrad committed Aug 16, 2022
1 parent 59c8788 commit 50bad90
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## [2.4.2] - 2022/08/16
* Fix for breaking change in flutter_secure_storage (thanks [asmith26](https://github.com/asmith26))

## [2.4.1] - 2022/07/17
* Fix accessing secure token storage on newer Android versions (thanks [Piotr Mitkowski](https://github.com/PiotrMitkowski)).
* Added custom params handling for Implicit grant flow (thanks [qasim90](https://github.com/qasim90))
Expand Down
6 changes: 4 additions & 2 deletions lib/src/secure_storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ class SecureStorage implements BaseStorage {

@override
Future<String?> read(String key) async {
final options = IOSOptions(accessibility: IOSAccessibility.first_unlock);
final options =
IOSOptions(accessibility: KeychainAccessibility.first_unlock);
return await storage.read(key: key, iOptions: options);
}

@override
Future<void> write(String key, String value) async {
final options = IOSOptions(accessibility: IOSAccessibility.first_unlock);
final options =
IOSOptions(accessibility: KeychainAccessibility.first_unlock);
return await storage.write(key: key, value: value, iOptions: options);
}
}
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: oauth2_client

description: Flutter library for interacting with OAuth2 servers, with classes for transparent authorized requests, secure OAuth token storage, automatic token refeshing.
version: 2.4.1
version: 2.4.2
homepage: https://github.com/teranetsrl/oauth2_client
repository: https://github.com/teranetsrl/oauth2_client
environment:
Expand All @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter
crypto: ^3.0.1
flutter_secure_storage: ^5.0.2
flutter_secure_storage: ^5.1.0
flutter_web_auth: ^0.4.1
http: ^0.13.4
meta: ^1.7.0
Expand Down

0 comments on commit 50bad90

Please sign in to comment.