Shared session between 2 Auth0 Apps

Hi everyone.
In my Auth0 tenant I have 2 apps: a Regular Web App and a Native App.
Regular Web app refers to a NextJS app (frontend + API backend);
while my Native App refers to an Android App I am working on.

My native app will have to connect with the Nexjts API backend, where the various endpoints are protected by Auth0.

So, what I want to achieve is:

  1. I log in to my native app;
  2. I retrieve the access token;
  3. I use access token as Bearer Token to authenticate to my NextJS App.

So, briefly my question is: is it possible to share a session between 2 Auth0 apps?

Hey @Audacia !

Thanks for the detailed description :slight_smile:

I recommend taking a look at the following topic:

If you are using an Auth0 SDK which utilizes a browser based login flow (Chrome Custom Tabs) and Chrome on the device to access the web app along with silent authentication you should get what you are looking for. Here’s an example of silent auth in nextjs:

Hi, thanks in advance for your response.

As regard silent authentication, I can retrieve a token in my Native App by consuming getAccessTokenSilently function from auth0/auth0-react library.

I already tried to use this token to authenticate to my Regular Web App APIs, but I get an error warning me that the format is incorrect (as I expected).

If I understand correctly, should I be able to do this by enabling SSO within my tenant?

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