-
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
bug: OnboardingService no longer supports activation #944
Comments
Walking through these issues with @sitaram-kalluri and @murali-shris & me transcribing our findings
Yes - if However clearly this is a bug and needs to be fixed. In general the use of the _atSign instance variable needs to be reviewed as well as all of the method parameters
Yes we can see how that happens if the atSign previously hasn't been onboarded - i.e. no entry for it in the keychain. To avoid the issue, need to ensure you don't call @sitaram-kalluri @murali-shris can you verify the above with some demo app please? i.e.
@XavierChanth I am assuming that your primary need here is to onboard and/or authenticate ... in both cases you need to use the |
Adding to the above, the only time we wanted to call |
Thanks @sitaram-kalluri Once you've verified the mitigation for the issue Xavier is facing right now, please create a ticket to tidy up OnboardingService - first its method documentation, then parameter validations (e.g. in |
Sure, Gary. |
The internal _atSign variable is used to store the currently onboarded atSign. If onboard fails, then _atsign should remain unchanged. The expected behavior is that when I call onboard. The atsign stored in the AtOnboardingRequest is the one used for onboarding. This will cause breakages in changePrimaryAtsign if that fails. It won't affect NoPorts, but it will affect other apps. |
@gkc and @XavierChanth : Verified the fix suggested above and able to onboard an atSign successfully when |
Yes, but this is not what the rest of the code in at_onboarding_flutter was using that method to do. All of the existing activation code is calling authenticate with the cramkey. |
The only proper way forward is to remove all the layers, including the OnboardingService, and replace it all with a proper utility class that provides a progress stream for the UI. Each one of the layers I found checks atServerStatus on its own before doing anything. The code as it is today, makes 3 or 4 api calls to the same thing before it does any work. My previous recommendation about adding generic Keychain management to at_auth removes the need for the OnboardingService to exist. |
Created a clean ticket : #946 |
Yes all of this is a complete mess and has a bad case of code rot |
I will uptake the same fixes I made to NoPorts back into this package once NoPorts is released |
OnboardingService.onboard
with the cramSecret, it just onboards a random atSign from the keychainOnboardingService.authenticate
with the cramSecret, it tries to pull an atSign from the keychain and throws with an uncaught exceptionThe text was updated successfully, but these errors were encountered: