# Use social connections to silently login

**URL:** <https://community.auth0.com/t/use-social-connections-to-silently-login/137471>\
**Category:** Get Help\
**Tags:** custom-social-connections-branding, connections\
**Created:** [June 26, 2024, 8:13am UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471 "2024-06-26T08:13:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavlo.daniv](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pavlo.daniv/32/58083_2.png) [@pavlo.daniv](https://community.auth0.com/u/pavlo.daniv)\
**Post date:** [June 26, 2024, 8:13am UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/1 "2024-06-26T08:13:42Z")

</div>

Hello!

We have two separate Auth0 tenants and want to avoid making users log in twice. We’ve used a social connection to allow users to sign into application 1 (tenant A) using their account from tenant B.

Is it possible for application 2 (tenant B) using the existing user session to sign into application 1 (tenant A) without being shown the login page?

Thanks in advance!

---

<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:** [June 27, 2024, 7:52pm UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/3 "2024-06-27T19:52:38Z")

</div>

Hi @pavlo.daniv,

Welcome to the Auth0 Community!

Yes, it is possible. You will need to use SAML SSO with tenant A as the SP to authenticate your users against the application in tenant, which will serve as the IdP.

See [this doc](https://auth0.com/docs/authenticate/protocols/saml/saml-configuration/configure-auth0-as-service-and-identity-provider) for more information.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![pavlo.daniv](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pavlo.daniv/32/58083_2.png) [@pavlo.daniv](https://community.auth0.com/u/pavlo.daniv)\
**Post date:** [June 27, 2024, 9:19pm UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/4 "2024-06-27T21:19:25Z")

</div>

Thank you for the reply @rueben.tiow

Will this approach allow us to communicate with two separate APIs secured by the different tenants or it’s something that works only for authenticating web applications?

And if it’s the latter, what approach we should take to allow user to stay on one web page and have single token for both rest APIs secured the separate tenants?

Thanks,  
Pavlo

---

<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:** [June 28, 2024, 10:53pm UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/5 "2024-06-28T22:53:08Z")

</div>

Hi @pavlo.daniv,

It should only work for the authenticating web applications. This is justified by the [API settings](https://manage.auth0.com/#/apis), which can only authorize applications on the same tenant.

In this situation, you can perform silent authentication after the user logs in with SAML to get an access token for the required `audience`. In your silent authentication request, include the API identifier (audience) for the API that you need the access token for.

By doing so, you can create access tokens for each API since they exist in different tenants and use them accordingly.

I hope this helps!

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![pavlo.daniv](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pavlo.daniv/32/58083_2.png) [@pavlo.daniv](https://community.auth0.com/u/pavlo.daniv)\
**Post date:** [June 29, 2024, 5:31pm UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/6 "2024-06-29T17:31:01Z")

</div>

In case of such a setup (with APIs secured by separate Auth0 tenants) do I need to create a third tenant to be an IdP of the other two tenants?  
Also, after I login with SAML into one of the apps (let’s say app under tenant A), will that page session be able to communicate with Management API (ether tenant B or the IdP tenant) to get other tenants’ access tokens?

Thanks,  
Pavlo

---

<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:** [July 1, 2024, 6:38pm UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/7 "2024-07-01T18:38:01Z")

</div>

Hi @pavlo.daniv,

> [@pavlo.daniv](#):
>
> In case of such a setup (with APIs secured by separate Auth0 tenants) do I need to create a third tenant to be an IdP of the other two tenants?

That’s correct! You can create three tenants, where tenant A (app 1) and tenant B (app 2) are both SPs, and the third tenant C is the IdP.

> [@pavlo.daniv](#):
>
> Also, after I login with SAML into one of the apps (let’s say app under tenant A), will that page session be able to communicate with Management API (ether tenant B or the IdP tenant) to get other tenants’ access tokens?

If you need to access either tenant B or the IdP tenant’s resource, you will need to perform silent authentication to get the access tokens for them. This involves passing in the `prompt=none` query parameter in the request.

For example:

```auto
GET https://{yourDomain}/authorize
    ?response_type=id_token token&
    client_id=...&
    redirect_uri=...&
    state=...&
    scope=openid...&
    nonce=...&
    audience=...&
    response_mode=...&
    prompt=none

```

See [Configure Silent Authentication](https://auth0.com/docs/authenticate/login/configure-silent-authentication).

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![pavlo.daniv](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pavlo.daniv/32/58083_2.png) [@pavlo.daniv](https://community.auth0.com/u/pavlo.daniv)\
**Post date:** [July 3, 2024, 1:43pm UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/8 "2024-07-03T13:43:17Z")

</div>

Hi @rueben.tiow ,

Thank you so much for your response!

So it looks like I can use the silent authentication even without a separate IdP.  
As soon as I have a application on tenant B end and the client\_id of that application on tenant A WebPage I can “exchange” the user access token of user in tenant A for user access token in tenant B.  
Meaning the SSO part (IdP and SP) can be used together with this flow but is really a optional thing.

Please confirm and thank you!

Thanks,  
Pavlo

---

<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:** [July 3, 2024, 5:25pm UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/9 "2024-07-03T17:25:50Z")

</div>

Hi @pavlo.daniv,

Yes, that’s correct! I can confirm. 👍

Let me know if you have any further questions.

Cheers,  
Rueben

---

<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:** [July 17, 2024, 5:26pm UTC](https://community.auth0.com/t/use-social-connections-to-silently-login/137471/10 "2024-07-17T17:26:46Z")

</div>

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