# API for user registration and login by social

**URL:** <https://community.auth0.com/t/api-for-user-registration-and-login-by-social/9265>\
**Category:** Get Help\
**Tags:** api, social-connections\
**Created:** [January 23, 2018, 2:11pm UTC](https://community.auth0.com/t/api-for-user-registration-and-login-by-social/9265 "2018-01-23T14:11:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wordpress.emvigo](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@wordpress.emvigo](https://community.auth0.com/u/wordpress.emvigo)\
**Post date:** [January 23, 2018, 2:11pm UTC](https://community.auth0.com/t/api-for-user-registration-and-login-by-social/9265/1 "2018-01-23T14:11:41Z")

</div>

What I am trying to implement is social reg/login for users in PHP. I need an auth0 api to resgister user social email. Then an social account should be created for that user. Another API to login this user. I have created normal db connection with ‘dbconnections/signup’ api. A similar api is what I looking for. This is for creating backend functionality for an app.

---

<div class="post-metadata">

**Author:** ![mmaddex](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mmaddex/32/7950_2.png) [@mmaddex](https://community.auth0.com/u/mmaddex)\
**Post date:** [March 9, 2018, 9:14pm UTC](https://community.auth0.com/t/api-for-user-registration-and-login-by-social/9265/2 "2018-03-09T21:14:18Z")

</div>

To register a User using a social Identity Provider you will use the [`/authorize`](https://auth0.com/docs/api/authentication?http#social) endpoint of our Authentication API.

To finish the User login process you would simply use the `code` (found in redirect url resulting from the call to `/authorize`) to make a call to [`oauth/token`](https://auth0.com/docs/api/authentication?http#authorization-code). That will return a JWT which you can [verify and parse](https://auth0.com/docs/api-auth/tutorials/verify-access-token) to get some basic information about the User.

This documentation provides a great overview of this process:

> **[OAuth 2.0 Authorization Framework](https://auth0.com/docs/authenticate/protocols/oauth)**
>
> Learn how Auth0 works with the OAuth 2.0 Authorization Framework.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 25, 2019, 11:05am UTC](https://community.auth0.com/t/api-for-user-registration-and-login-by-social/9265/3 "2019-07-25T11:05:17Z")

</div>


