Hi Fiete,
I can see you've sent some AuthenticationRequests with no userName field included at all, this would lead to Spark.getData().userName returning null, I've never encountered this returning null in any other case in the AuthenticationRequest myself. There is no way to login with either an email or userName, just one. You can only authenticate with what is in the userName field, this could be a specific userName or an email address in the userName field.
Thanks,
Liam
Hi Liam,
thanks allot for your fast answer. Sean mailed me as well. Don't know how the missing userName fields happened, but it was probably my fault.
Thanks allot and best regards
Fiete Groth
Hi!
We would like for our users to be able to login with either their registered email (user name) or their name (display name).
For that I wanted to use the following code:
Their, I got two problems / potential bugs:
1. Getting the user name is quite tricky. Spark.getData())).userName only returns null. But logging the whole data gives you a normal JSON. Only if I parse it to string and back, I get the name out correctly. But hey, at least it's working..
2. But overwriting the name with the email does not work at all. How can i change the user name before actually doing the authentication?