Auto login via company okta dashboard

Hi There,

I have a single-page web app and I have added an okta signing widget by following this tutorial https://developer.okta.com/blog/2020/07/15/secure-serverless-functions-with-netlify (https://github.com/oktadeveloper/okta-netlify-function-example/blob/master/client/index.js)
successfully. Also, made okta verification for app APIs.

it is working fine. it allows an employee to log in to the web app before access app functionality.

But I want an employee can directly access web App functionality (No need to login on App again) by click on the web App tile at the company Okta dashboard. and redirect to the Web APP.

What do I need to change in the code here https://github.com/oktadeveloper/okta-netlify-function-example/blob/master/client/index.js?

Thank you

You likely want to look into supporting SSO. When they user logs into Okta, an Okta session is created for them in their browser, setting a session cookie called ‘sid.’ This session can be used by your application to get tokens for the user without asking them to sign in again.

Our Auth JS SDK has a couple of methods that can help:

Note, these calls will fail if your browser blocks third party cookies (such as Safari with “Prevent Cross Site Tracking” enabled an Chrome Incognito by default) and your app is hosted on a separate domain from your Okta tenant). More details here.

With these methods, you can 1) determine if the user is signed into Okta, thus are able to get tokens or 2) determine that they need to log into Okta and should be shown the widget