Skip to content
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 Bsky login check #382

Merged
merged 3 commits into from
Nov 11, 2024
Merged

Conversation

askmeaboutlo0m
Copy link
Contributor

Bsky login checks started failing in strange ways with inexplicable error messages deep inside the atproto library. For some reason this only happens inside the ui component and only on a fresh instance of PostyBirb, so I dunno what that's about. Moving the login check to the electron-app seems to fix it though, so this removes atproto from the ui component and goes that route instead.

This also fixes the Bsky login check spewing errors when no credentials are present and warns the user if the password they enter doesn't look like an app password, since they are likely to enter their account password instead, which causes exciting behavior if they have 2FA enabled and won't actually work.

It accessed undefined data and fell on its face, now it returns
successfully with loggedIn set to false.
After rebasing to the main repository's develop branch, Bluesky login in
the UI is suddenly failing with some kind of garbage "url must be a
string not an object" error when we aren't passing any such parameter in
the first place. I don't know what that's about, but doing it in
electron-app works fine, so I changed the UI code to defer to that
instead. This also improves the error messages so that the user isn't
left with the page seemingly not reacting to their input at all.
App passwords have a pretty regular format, so we can check for that and
warn the user that they enter something else, probably their account
password. Since the app password format could conceivably change in the
future, we leave it at a warning and don't refuse saving in that case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants