# Username support on social connections

**URL:** <https://community.auth0.com/t/username-support-on-social-connections/58980>\
**Category:** Get Help\
**Tags:** username, social-connections\
**Created:** [March 5, 2021, 7:17pm UTC](https://community.auth0.com/t/username-support-on-social-connections/58980 "2021-03-05T19:17:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sazzer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sazzer/32/27418_2.png) [@sazzer](https://community.auth0.com/u/sazzer)\
**Post date:** [March 5, 2021, 7:17pm UTC](https://community.auth0.com/t/username-support-on-social-connections/58980/1 "2021-03-05T19:17:56Z")

</div>

I’m relatively certain the answer to this is “You can’t do that”, but thought I’d ask anyway.

I’m working on a CMS site where I want to have content namespaced by the user and the actual site name - similar to how GitHub works. So `/graham/something` is different to `/fred/something`.

With the “Username-Password-Authentication” connection this is relatively easy. Just turn on “Requires Username”, and then all users will have a username and the can be searched by that.

However, anyone who authenticates via a social connection - Google, Facebook, etc - will _not_ have a username, and attempting to save a username on their profile results in:

```auto
{"statusCode":400,"error":"Bad Request","message":"Cannot update username for non-database user","errorCode":"operation_not_supported"}

```

Is this just something that can’t be done? Or is there some way to have users on social connections that also have usernames?

Cheers

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [March 5, 2021, 8:39pm UTC](https://community.auth0.com/t/username-support-on-social-connections/58980/3 "2021-03-05T20:39:14Z")

</div>

Hi @sazzer,

This answer might be what you are looking for: [Signup with username & social connections - #2 by Abhishek\_Hingnikar](https://community.auth0.com/t/signup-with-username-social-connections/4255/2)

As described in the answer, you could set up a redirect rule for social logins to collect the username field on a special page: [Redirect Users from Within Rules](https://auth0.com/docs/rules/redirect-users?_ga=2.94124317.1459667918.1614604126-1595415333.1607347674)

> [@Signup with username & social connections](https://community.auth0.com/t/signup-with-username-social-connections/4255/2):
>
> - User signs up with social connection, after checking `email` and `email_verified` . You can check if the user has a connected identity with a database user in `user.identities` array. If such an identity exists, the rule will pass through if not, the rule will redirect the user to a special page which asks the user for their username and a password.
> - On this page, you can setup your API server so that it accepts, a username-password pair from this page and creates a secondary identity for that user using [Management API v2](https://auth0.com/docs/management/v2). The page will then redirect the user back to the `/continue` endpoint and when #1\> occurs it lets the user pass through.

---

<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:** [June 25, 2021, 12:53pm UTC](https://community.auth0.com/t/username-support-on-social-connections/58980/4 "2021-06-25T12:53:22Z")

</div>

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