From def786a1d8af2f7f036fa8e6d4fb45f3cd5c156b Mon Sep 17 00:00:00 2001 From: murali-shris Date: Tue, 10 Oct 2023 14:00:32 +0530 Subject: [PATCH] fix: generate keys file after onboard --- .../lib/src/onboard/at_onboarding_service_impl.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/at_onboarding_cli/lib/src/onboard/at_onboarding_service_impl.dart b/packages/at_onboarding_cli/lib/src/onboard/at_onboarding_service_impl.dart index f9ca31c6..68eded9c 100644 --- a/packages/at_onboarding_cli/lib/src/onboard/at_onboarding_service_impl.dart +++ b/packages/at_onboarding_cli/lib/src/onboard/at_onboarding_service_impl.dart @@ -134,6 +134,12 @@ class AtOnboardingServiceImpl implements AtOnboardingService { var atOnboardingResponse = await atAuthService.onboard( atOnboardingRequest, atOnboardingPreference.cramSecret!); print('****atOnboardingResponse: $atOnboardingResponse'); + if (atOnboardingResponse.isSuccessful) { + logger.finer( + 'Onboarding successful.Generating keyfile in path: ${atOnboardingPreference.atKeysFilePath}'); + await _generateAtKeysFile(atOnboardingResponse.enrollmentId, + atOnboardingResponse.atSecurityKeys!); + } return _isAtsignOnboarded; }