Login using oauth/toke 2 apps

Hi @amit.mahajan

Welcome to the Auth0 Community!

I think that you should benefit from this response → Sharing authentication between 2 sites - #2 by jmangelo which generally boils down to this:

  1. The end-user accesses application A which has no idea who the user is so it makes a non-interactive request to idp as a way to verify if the current end-user has already authenticated.
  2. If the end-user never authenticated before application A is notified of that and redirects the end-user to the idp authorization endpoint where the end-user will authenticate through the hosted login page .
  3. If the end-user already authenticated before application A will receive the user identity and any applicable tokens and proceed to treat the end-user as authenticated.
  4. The end-user accesses application B which has no idea who the user is and a similar dance as above is done, however, now the user is already authenticated so application B will be able to treat the user as authenticated without requiring end-user interaction.

The key points from above is that an application can inquire if a user is already authenticated in a non-interactive way (without user intervention). In case of success the application can proceed to use the current user identity and any applicable tokens received. If the response is negative then the application should redirect the user through the hosted login page so that he can authenticate and at the same time start an authenticated session at the idp.

Thanks
Dawid