# SSO between mobile app and web app using same auth0 user account

**URL:** <https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484>\
**Category:** Get Help\
**Created:** [September 28, 2022, 5:48pm UTC](https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484 "2022-09-28T17:48:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![donniekerr01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donniekerr01/32/39308_2.png) [@donniekerr01](https://community.auth0.com/u/donniekerr01)\
**Post date:** [September 28, 2022, 5:48pm UTC](https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484/1 "2022-09-28T17:48:32Z")

</div>

I have an Auth0 application that has a mobile web app and a mobile native app (origins,callbacks,etc). The user has to log into either one separately.  
Can a user log into the mobile app and click a button to open the web app and have it log into the web app like SSO? It would be a better user experience not to have to log in separately.

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [September 29, 2022, 4:00pm UTC](https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484/2 "2022-09-29T16:00:49Z")

</div>

If your mobile app uses a browser based flow (and shares cookies with the web app browser) you get SSO for free.

John

---

<div class="post-metadata">

**Author:** ![donniekerr01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donniekerr01/32/39308_2.png) [@donniekerr01](https://community.auth0.com/u/donniekerr01)\
**Post date:** [September 29, 2022, 4:25pm UTC](https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484/3 "2022-09-29T16:25:45Z")

</div>

They both use same universal login. On mobile side it did require a Browser plugin for capacitor.  
I just don’t know home to pass the cookie on mobile to the external web app.

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [September 30, 2022, 1:18pm UTC](https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484/4 "2022-09-30T13:18:50Z")

</div>

Hi @donniekerr01

At a guess, you are using an embedded browser, and that doesn’t share cookies with the system web browser. If that is the case, you’ll need to switch to using the system web browser for login.

John

---

<div class="post-metadata">

**Author:** ![donniekerr01](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/donniekerr01/32/39308_2.png) [@donniekerr01](https://community.auth0.com/u/donniekerr01)\
**Post date:** [September 30, 2022, 2:01pm UTC](https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484/5 "2022-09-30T14:01:35Z")

</div>

You are correct, the capacitor browser was required to make it a seamless experience for the user of auth0 in native app.

I figured it couldn’t share the cookie to external browser. Just wasn’t sure if there was a way to acomplish something like SSO between them since they use same auth0 app.  
Appreciate the help

---

<div class="post-metadata">

**Author:** ![marcin2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@marcin2](https://community.auth0.com/u/marcin2)\
**Post date:** [June 16, 2023, 8:21am UTC](https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484/6 "2023-06-16T08:21:09Z")

</div>

Hi @donniekerr01,  
you’ve probably found a solution a long time ago, but I’d like to share mine as it might help others struggling with this.

I’m building a Flutter mobile app and using the auth0\_flutter lib to do the auth. To get SSO working, on iOS, I set the auth0 sdk to do the auth flow in a `SFSafariViewController` and then opened the web app that was supposed to use that session in a `SFSafariViewController` as well.

On Android, I ran the auth flow in Custom Chrome Tabs (the default in the auth0 Flutter sdk) and then the external browser (Chrome) did pickup the session.

Cheers,  
Marcin

---

<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 26, 2024, 1:20am UTC](https://community.auth0.com/t/sso-between-mobile-app-and-web-app-using-same-auth0-user-account/91484/7 "2024-07-26T01:20:12Z")

</div>

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