Single Sign On Implementation guidence

Hope you doing great.
I’m trying to implementing sso for 2 Openid connect applications.
let say i have 2 SPA OIDC application with PKCE flow in my okta org.
if a users login into APP 1 then it can automatically logs into app 2 if he opens it into second tab or browser. just like google sso works, like if you sign in into Gmail and open YouTube in another tab, you are sign in to YouTube automatically. I know it uses SAML. All I need is implementation that how it works in OIDC.

  1. First of all tell me that which is the best option to implement single sign on. Implementing it on okta sign in widget or the custom login page.
  2. secondly need to know how to implement it for both cases. e.g what to configure on admin console and what functions to use in the code base (you can reference to the Sign in widget code to explain the implementation.)
  3. For testing purpose i’m using the Sign in widget code example and after a lot of searching on devforum i have found a function getWithoutPrompt from oauthClient. I don’t know what it does and how it works but let say if i used it in APP 1 and if i sign in into APP 2 and opens APP 1 in second tab then it will somehow signs me in.

Will really appreciate your help if anyone can show me a path way to achieve this properly as i have to implement for a client

Maybe this can help you - java - Single Sign On with Okta session - Stack Overflow

I saw the post you shared but it didn’t help me. I saw the git hub repo that’s why i mentioned about getWithoutPrompt() function or getWithRedirect(). I need to understand the the proper way to implement SSO.

Both ways are “proper”, it all depends on your requirements. If you understand the difference between those 2 mentioned, you should be able to make a decision for yourself.