Skip to content

Remove whitespace from appleIDTextField#134

Merged
keith merged 2 commits intobr1sk:masterfrom
stevemoser:patch-1
Feb 10, 2018
Merged

Remove whitespace from appleIDTextField#134
keith merged 2 commits intobr1sk:masterfrom
stevemoser:patch-1

Conversation

@stevemoser
Copy link
Copy Markdown
Contributor

Fixes #133

Turns out that when using my text expander app for the email it adds a space at the end which causes authentication to fail.


@IBAction private func login(_ sender: Any) {
let username = self.appleIDTextField.stringValue
let username = self.appleIDTextField.stringValue.trimmingCharacters(in: .whitespacesAndNewlines)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, can you do this for the password field as well I guess

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this on the password field seems a bit too heavy-handed since anyone with a leading or trailing space in a password couldn't use the app anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I don't know Apple's policy on password but I have seen other apps that accept leading trailing whitespace as a valid password. Leading and trailing whitespace for emails though is invalid.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sg, no need to do that for now

@keith
Copy link
Copy Markdown
Member

keith commented Feb 9, 2018

Please add an entry to the changelog!

For removing Apple ID Login whitespace.
@keith keith merged commit 2f524dc into br1sk:master Feb 10, 2018
@keith keith added this to the 1.2.0 milestone Jul 7, 2018
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.

3 participants