OIDC login flow from okta dashboard

I would like to integrate Okta OIDC with my React web app. I want to add my app to the Okta user home dashboard so that when a user clicks on it, they can log in to my app using an Okta token.

I was able to add my app to the Okta dashboard. But I want to implement the below please help.

  1. Whenever I click on my app from the Okta home dashboard, It should redirect to my login page, in that login page I want to get an Okta token. From this token, I need to find the user’s email linked to Okta.
  2. Then, I will check in my database if this user is in my user’s table. If they are, I will redirect them to my main dashboard page.

I want to do this using OIDC, but I can’t find a way to get the token on my React login page after being redirected from the Okta home dashboard

Hi,

When you are at your login page since the user is not yet logged in, it is not possible to get any token. But when the user sign into the Okta dashboard you can extract the token from there and maybe you can use that for your business use case.

Hello,
To integrate Okta OIDC with your React app and ensure users can log in from the Okta dashboard start by configuring an OIDC app in Okta with the correct redirect URI. Install the Okta SDK in your React app and set up routing to handle login callbacks and secured routes. In your login component use the Okta Auth SDK to manage authentication and retrieve the user’s email. Verify the user in your database and redirect them to the main dashboard if they exist.