Skip to content

Commit

Permalink
didRegisterPasskey config
Browse files Browse the repository at this point in the history
Signed-off-by: phuoc <[email protected]>
  • Loading branch information
phuocbitmark committed Oct 24, 2024
1 parent fee4c87 commit 6e428b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ class BackupDartPlugin : MethodChannel.MethodCallHandler {
.addOnSuccessListener {

Log.e("setDidRegisterPasskey", data.toString());
result.success("")
result.success(true)
}
.addOnFailureListener { e ->
Log.e("setDidRegisterPasskey", e.message ?: "")
result.error("setDidRegisterPasskey error", e.message, e)
result.success(false)
}
}

Expand Down
16 changes: 14 additions & 2 deletions lib/util/user_account_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class UserAccountChannel {
}
}

Future<bool> setUserId(String userId, {bool isPasskeys = false }) async {
Future<bool> setUserId(String userId, {bool isPasskeys = false}) async {
try {
await _channel.invokeMethod('setUserId', {'data': userId});
_userId = userId;
Expand Down Expand Up @@ -90,10 +90,22 @@ class UserAccountChannel {
}
}

Future<bool> didMigrateUser() async {
Future<bool> didCreateUser() async {
final userId = await getUserId();
return userId.isNotEmpty;
}

Future<bool> didRegisterPasskey() async {
final didRegister = await _channel.invokeMethod('didRegisterPasskey', {});
return didRegister;
}

Future<bool> setDidRegisterPasskey(bool value) async {
final didRegister = await _channel.invokeMethod('setDidRegisterPasskey', {
'data': value,
});
return didRegister;
}
}

class AddressInfo {
Expand Down

0 comments on commit 6e428b5

Please sign in to comment.