# Username not saving on account creation (Android, Auth API Client)

**URL:** <https://community.auth0.com/t/username-not-saving-on-account-creation-android-auth-api-client/69410>\
**Category:** Get Help\
**Tags:** android, login\
**Created:** [September 10, 2021, 5:35am UTC](https://community.auth0.com/t/username-not-saving-on-account-creation-android-auth-api-client/69410 "2021-09-10T05:35:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![taymaw](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/taymaw/32/25832_2.png) [@taymaw](https://community.auth0.com/u/taymaw)\
**Post date:** [September 10, 2021, 5:35am UTC](https://community.auth0.com/t/username-not-saving-on-account-creation-android-auth-api-client/69410/1 "2021-09-10T05:35:15Z")

</div>

I am creating an account using the Authentication API Client on Android which works, but for some reason, the username never gets saved unless when signing in using Google or such, but never when creating a database user. Does anyone know how to fix this or perhaps a way to just manually set the username after the user has logged in? Thanks

```auto
AuthenticationAPIClient(account)
            .createUser(email, password, username, Auth0Constants.connection)
            .setConnection(Auth0Constants.connection)
            .start(callback)

```

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 10, 2021, 5:52pm UTC](https://community.auth0.com/t/username-not-saving-on-account-creation-android-auth-api-client/69410/3 "2021-09-10T17:52:42Z")

</div>

Hi @taymaw,

Welcome to the Auth0 Community!

I understand that you are encountering a situation where the username is not saving on account creation.

First, could you please clarify whether you have **enabled** the `Requires Username` feature in your database connection? If not, please navigate to your Auth0 Dashboard [database connections](https://manage.auth0.com/#/connections/database) and switch on this feature. Please make sure to click **Save**.

Once you have enabled this feature, you can create users with a `username` and have that field saved in their user profile.

Having tested this myself, I was able to sign up a user using the Authentication API and verified that everything works as intended.

Please let me know if this resolves your issue.

---

<div class="post-metadata">

**Author:** ![taymaw](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/taymaw/32/25832_2.png) [@taymaw](https://community.auth0.com/u/taymaw)\
**Post date:** [September 12, 2021, 10:52pm UTC](https://community.auth0.com/t/username-not-saving-on-account-creation-android-auth-api-client/69410/4 "2021-09-12T22:52:06Z")

</div>

Thanks, If I enabled this feature will I still be able to sign up users without a username? I have an app that is using the same database, and doesn’t require a username, but in the new one I want to be able to save a username. If I enable require username will that negatively impact the first app? Thanks

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 14, 2021, 4:59pm UTC](https://community.auth0.com/t/username-not-saving-on-account-creation-android-auth-api-client/69410/5 "2021-09-14T16:59:39Z")

</div>

Hi @taymaw,

Unfortunately, if you disable the **Requires Username** feature, your users’ will **not** be able to sign up with a username. The **Requires Username** toggle is all-or-nothing.

Therefore, I recommend that you handle your use case by:

1. Isolating your existing Database Connection that does not require a username.

2. And then, creating a new Database Connection with the `Requires Username` feature enabled. Make sure that your application has only the new Database Connection enabled. That is, all other database connections are disabled except for the newly made Database Connection.

Doing so will avoid any conflict with your first application.

Please let me know if you have any further questions. I would be happy to help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [September 30, 2021, 4:35pm UTC](https://community.auth0.com/t/username-not-saving-on-account-creation-android-auth-api-client/69410/6 "2021-09-30T16:35:26Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [August 19, 2024, 3:36pm UTC](https://community.auth0.com/t/username-not-saving-on-account-creation-android-auth-api-client/69410/7 "2024-08-19T15:36:26Z")

</div>

Hi team!

Updating this topic with our latest solution that makes it possible to create an account with flexible identifiers → [Activate and Configure Attributes for Flexible Identifiers](https://auth0.com/docs/authenticate/database-connections/activate-and-configure-attributes-for-flexible-identifiers). You can select between Email, Phone, or Username as Identifiers for your database connection.

Thanks  
Dawid
