-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: atSign activation #948
base: trunk
Are you sure you want to change the base?
Conversation
atSignStatus == ServerStatus.teapot) { | ||
_onboardingService.setAtsign = previousAtsign; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actual change for this file is here, the rest is formatting from 120 to 80, as this is a published package. (559 old file : 604 new file)
authResponse = await _onboardingService.authenticate(atsign, | ||
cramSecret: secret, status: OnboardingStatus.ACTIVATE); | ||
String? previousAtsign = _onboardingService.currentAtsign; | ||
_onboardingService.setAtsign = atsign; | ||
authResponse = await _onboardingService.onboard( | ||
cramSecret: secret, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to onboard
if (authResponse != AtOnboardingResponseStatus.authSuccess || | ||
atSignStatus == ServerStatus.teapot) { | ||
_onboardingService.setAtsign = previousAtsign; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert to previous atsign on a failed activation (authSuccess + teapot at this point is considered a timeout failure)
authResponse = await _onboardingService.authenticate( | ||
verifiedAtSign, | ||
cramSecret: cramSecret, | ||
status: OnboardingStatus.ACTIVATE, | ||
String? previousAtsign = _onboardingService.currentAtsign; | ||
_onboardingService.setAtsign = verifiedAtSign; | ||
authResponse = await _onboardingService.onboard( | ||
cramSecret: secret, | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
} else if (authResponse == AtOnboardingResponseStatus.serverNotReached) { | ||
} else { | ||
_onboardingService.setAtsign = previousAtsign; | ||
} | ||
|
||
if (authResponse == AtOnboardingResponseStatus.serverNotReached) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as revert above, slightly different semantic structure in this part of the code, so the change looks different
await _showAlertDialog( | ||
AtOnboardingLocalizations.current.msg_atSign_unreachable, | ||
); | ||
} else if (authResponse == AtOnboardingResponseStatus.authFailed) { | ||
await _showAlertDialog( | ||
AtOnboardingLocalizations.current.error_authenticated_failed, | ||
); | ||
} else { | ||
} else if (authResponse != AtOnboardingResponseStatus.authSuccess) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking the if-else chain requires an explicit check for non-success on our catch-all error check
final String _incorrectKeyFile = AtOnboardingLocalizations.current.msg_cannot_fetch_keys_from_chosen_file; | ||
final String _failedFileProcessing = AtOnboardingLocalizations.current.error_processing_files; | ||
final String _incorrectKeyFile = | ||
AtOnboardingLocalizations.current.msg_cannot_fetch_keys_from_chosen_file; | ||
final String _failedFileProcessing = | ||
AtOnboardingLocalizations.current.error_processing_files; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was misformatted, corrected from 120 to 80, I've marked the actual changes with a comment near line 600
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops spoke too soon ... one of the 'stable' checks is failing https://github.com/atsign-foundation/at_widgets/actions/runs/12036898481/job/33559158729?pr=948
Analyzing at_onboarding_flutter...
warning • Unused import: 'package:at_auth/at_auth.dart' • lib/screen/at_onboarding_activate_screen.dart:4:8 • unused_import
warning • Unused import: 'package:at_client_mobile/at_client_mobile.dart' • lib/screen/at_onboarding_activate_screen.dart:5:8 • unused_import
warning • The value of the local variable 'cramSecret' isn't used • lib/screen/at_onboarding_generate_screen.dart:458:12 • unused_local_variable
- What I did
- How I did it
- How to verify it
- Description for the changelog
fix: atSign activation