-
Notifications
You must be signed in to change notification settings - Fork 121
Fix initialization of authenticator #15953
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 initialization of authenticator #15953
Conversation
|
|
…xpired paid plans)" This reverts commit 73aa96f.
RafaelKayumov
left a comment
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, pre-approving. Left a couple of comments.
|
|
||
| /// the authenticator needs to be initialized with configs | ||
| /// to be used for requesting authentication link and handle login later. | ||
| WordPressAuthenticator.initializeWithCustomConfigs(dotcomAuthScheme: dotcomAuthScheme) |
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.
Looks like the dotcomAuthScheme argument of initializeWithCustomConfigs method is no longer being passed and the ApiCredentials.dotcomAuthScheme default value is always used there. May be it's worth removing the method argument at all?
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.
Removed in 40282f6.
| } | ||
|
|
||
| /// Configures the WPAuthenticator for usage in both logged-in and logged-out states. | ||
| func configureAuthenticator() { |
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.
There is another configureAuthenticator call on line 292. Should it removed as well?
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.
Thanks for catching this! Removed in b4f38e6.

Closes WOOMOB-902
Description
We got crash reports in the
LoginViewController.showLoginEpiloguestep of the login flow. This method can fail in two cases:navigationControllerof the view controller cannot be found.authenticationDelegateis nil.This PR mitigates the issue with some enhancements:
fatalErrorin the login flow to better understand the issue if the above doesn't fix the crash.Note: I'm targeting 23.0 for this PR as the crash is likely an edge case. Let me know if you think we should target the beta build 22.9 instead.
Testing steps
Test login using different scenarios:
Testing information
Tested the above test cases using simulator iPhone 16 iOS 18.4.
Screenshots
No UI changes.
RELEASE-NOTES.txtif necessary.