Auth0 Home Blog Docs

Nickname is not set to username when signing up

Hi,

I’m working on app with a windows (C# WPF client) and Android (Kotlin, native client) which uses Auth0 for authentication, but I’m getting a really weird behavior from the Auth0 process.
Right now, in term of sign in/up pipeline, what I do is I’m using the WebAuthProvider login form to do the login, and on success, I use the AuthenticationAPIClient to get the user profile of the user containing the username (under the field ‘nickname’) and other useful information.

My problem is the following:
When a new user sign up with a username-password-email account, the nickname I get IS NOT the username of the user, but instead is the first part of his e-mail (before the @).
BUT, when I sign in with an existing user, I get the actual username as the nickname.
This is really weird because I want to store the user’s username in my database when a new user signs up, but I currently can’t find a way to achieve this, other than forcing the user to logout and login again, which is really, really bad.

Can someone enlighten me on what’s going on here, and why I can’t get the username of the newly created user ?

Thank you

I’m experiencing almost the exact same issue right now. My environment is React Native and I’m using Authorization Code Grant Flow with PKCE. Where I am seeing the same behavior is in the response from webAuth.authorize() - the nickname in the idToken is incorrect - it contains the first part of the email (before the @). This only happens right after sign-up. If the user logs out and back in, the nickname is set correctly in the idToken.

Have you been able to find any solutions for this?