# How do I create a user that is signing up via Facebook?

**URL:** <https://community.auth0.com/t/how-do-i-create-a-user-that-is-signing-up-via-facebook/8102>\
**Category:** Get Help\
**Tags:** auth0swift, signup, facebook\
**Created:** [September 6, 2017, 7:04am UTC](https://community.auth0.com/t/how-do-i-create-a-user-that-is-signing-up-via-facebook/8102 "2017-09-06T07:04:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/greg/32/6760_2.png) [@greg](https://community.auth0.com/u/greg)\
**Post date:** [September 6, 2017, 7:04am UTC](https://community.auth0.com/t/how-do-i-create-a-user-that-is-signing-up-via-facebook/8102/1 "2017-09-06T07:04:58Z")

</div>

We are using Auth0.swift. We would like to offer our users the ability to sign up for our service using Facebook, without being required to provide email/password, and then subsequently use the loginSocial function to log in using the FB token. However, I’m not seeing a createUser function that can be used with Facebook.

Is there an example that shows how to create a Facebook signup flow using the Auth0.swift framework? We are not planning on using Lock, as we have specific UI requirements that won’t be met by customizing the Lock login page.

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [September 6, 2017, 4:03pm UTC](https://community.auth0.com/t/how-do-i-create-a-user-that-is-signing-up-via-facebook/8102/2 "2017-09-06T16:03:24Z")

</div>

**The `loginSocial` function** translates to a call to `/oauth/access_token` [endpoint](https://auth0.com/docs/api/authentication#social-with-provider-s-access-token) which as mentioned in the docs **is part of the legacy API surface and as such it’s not recommended**. The recommendation would be to perform social login through the system browser.

Having said that, the registration/signup of a social user is very much indistinguishable of a subsequent authentication operation; the main difference is that if it’s the first time the users completes the authentication then a user record will be created in your tenant and associated with the social connection. In conclusion, if you call the endpoint in question with a valid social provider access token and the user does not yet exist in your tenant then it will just be created as part of completing that login operation; there is no specific create user step for social connection users.

---

<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:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/how-do-i-create-a-user-that-is-signing-up-via-facebook/8102/3 "2018-03-02T05:56:21Z")

</div>


