# Help with custom social connection

**URL:** <https://community.auth0.com/t/help-with-custom-social-connection/89774>\
**Category:** Get Help\
**Tags:** social-connection, custom-social-connec, social-connections, login, auth0\
**Created:** [August 31, 2022, 4:01pm UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774 "2022-08-31T16:01:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![assafShilo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/assafshilo/32/39645_2.png) [@assafShilo](https://community.auth0.com/u/assafShilo)\
**Post date:** [August 31, 2022, 4:01pm UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774/1 "2022-08-31T16:01:31Z")

</div>

Hi all,  
I would like to create a custom social connection that will have the ability to do magics when the user first logged in, for that I need the access and refresh token.  
I tried to set the ‘Authorization URL’ to my server, I got my tokens, but I don’t know how to continue with the Auth0 flow after this.  
How can I do this?  
Is there any documentation for How to create a custom social domain that works with custom connection.  
Thanks a lot

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [August 31, 2022, 4:23pm UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774/2 "2022-08-31T16:23:39Z")

</div>

Hi @assafShilo

Welcome to the Auth0 Community.

The documentation [here](https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/oauth2) shows how to configure and test custom social connections. There should be everything here that you need to get going.

Warm regards.

---

<div class="post-metadata">

**Author:** ![assafShilo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/assafshilo/32/39645_2.png) [@assafShilo](https://community.auth0.com/u/assafShilo)\
**Post date:** [August 31, 2022, 4:43pm UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774/3 "2022-08-31T16:43:05Z")

</div>

Thank you very much.

I’m trying to create a custom social connection with custom identity.

Where should I redirect the user when I get the tokens ?

Thanks

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [August 31, 2022, 10:50pm UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774/4 "2022-08-31T22:50:41Z")

</div>

Hi @assafShilo

Are you using token based authentication? generally this is used to access API’s and you would send the token along with your request via the authorization header as a bearer token [https://auth0.com/docs/secure/tokens/token-best-practices#tokens-vs-cookies](https://auth0.com/docs/secure/tokens/token-best-practices#tokens-vs-cookies)

Further information on this here [https://auth0.com/learn/token-based-authentication-made-easy/](https://auth0.com/learn/token-based-authentication-made-easy/)

I would recommend using one of our SDK’s for your web application [https://auth0.com/docs/libraries](https://auth0.com/docs/libraries) as they make authentication easy with any of your connections.

Warm regards.

---

<div class="post-metadata">

**Author:** ![assafShilo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/assafshilo/32/39645_2.png) [@assafShilo](https://community.auth0.com/u/assafShilo)\
**Post date:** [September 1, 2022, 7:17am UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774/5 "2022-09-01T07:17:24Z")

</div>

Hi @SaqibHussain,  
I need to create a custom social connection that when the user logs in it will do the following:

1. get credentials (access and refresh tokens) from hubspot.
2. save the access and refresh tokens on my side (call my api)
3. redirect as authenticated user to my app.

Is it possible to do that?  
Thanks

---

<div class="post-metadata">

**Author:** ![SaqibHussain](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/saqibhussain/32/42924_2.png) [@SaqibHussain](https://community.auth0.com/u/SaqibHussain)\
**Post date:** [September 14, 2022, 6:31am UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774/6 "2022-09-14T06:31:07Z")

</div>

Hi @assafShilo

When you make your call to the /authorize endpoint you can add a redirect\_url as part of that call. Once you successfully authenticate with HubSpot and receive your tokens you will be redirected to this URL which is likely to be your application, please see here [https://auth0.com/docs/authenticate/protocols/oauth#authorization-endpoint](https://auth0.com/docs/authenticate/protocols/oauth#authorization-endpoint)

Warm regards.

---

<div class="post-metadata">

**Author:** ![bahador](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bahador/32/49655_2.png) [@bahador](https://community.auth0.com/u/bahador)\
**Post date:** [March 27, 2024, 8:13pm UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774/7 "2024-03-27T20:13:02Z")

</div>

Hello @SaqibHussain I have the same issue for QuickBooks. Can you please help me in this:

I am trying to do social authentication via Auth0, and then store the access token, refresh token, and realmId (the company id of business) in Auth0 for future retrieval. Unfortunately, I stuck here. I appreciate your 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:** [August 31, 2024, 12:58am UTC](https://community.auth0.com/t/help-with-custom-social-connection/89774/8 "2024-08-31T00:58:23Z")

</div>

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