Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse case insensitive login

I am using Parse in my Xcode application and when I try to login with:

username: Admin password: test

it works. But when I enter

username: admin password: test

the login parameters are invalid. Is there a way to make Parse not case sensitive?

like image 689
Trenton Tyler Avatar asked Jul 10 '26 19:07

Trenton Tyler


2 Answers

Basically what the link in the comment says is that when you create a new user object or before you let a user login call:

let username = usernameLabel.text
..........................
username = username.lowercaseString
..........................
//Then save the object

So it's not a way to make Parse case-insensitive but it eliminates the need to make it case-insensitive since everything is lowercased.

like image 137
keji Avatar answered Jul 13 '26 15:07

keji


Some parameters Parse uses are case sensitive so it's up to you to implement the proper methods to rectify this before a user saves any User column properties. After the fact will be too late. So in short, let the user type whatever username they want and save it to the backend as a lowercase string. Then when they re-enter it, translate the user input string into another lowercase string and validate it against the backend (which is now a lower case representation)

like image 25
soulshined Avatar answered Jul 13 '26 15:07

soulshined



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!